Code Challenge for build a simple, anonymous chat web appplication running in node.js with a React front-end.
- Users are able to join the chat server anonimously.
- Messages are colored to identify which user send they.
- Users can leave/disconnect from the server anytime.
- Users joining the chat will see chat messages from the moment they join.
- Users will see an 'is typing' message when other user is typing a message.
- node.js / npm
- socket.io
- express
- React
- Babel
- Twitter Bootstrap
After installing Node.JS (v5.2.0+), Git please make sure you have Bower client.
$ npm install -g bower
Being on the main project folder run:
$ npm install && bower install
And launch run npm start
.
Make sure that you update server.js:
server.listen(app.get('port'), function(){ console.log('Express Chat server on port ' + app.get('port')); });
and add your own IP address/hostname if required, i.e.:
server.listen(app.get('port'), "137.10.3.52", function(){ console.log('Express Chat server listening on port ' + app.get('port')); });
and the port defined in the app.set('port', 3000);
Please also update src/chat-component.js:
var chatServerAddress = "http://10.0.0.20:3000";
with the right IP address/hostname.
After running your environment you should be able to see: