Updated index.js to receive TextMessages over websocket connection.