The client side code chat.js added to /public/javascripts folder