setup index.js for the chat app