Chatter Box is an engaging project that allows you to explore the world of WebSockets while building a dynamic chatroom application. By leveraging the ws package for WebSocket server development and the browser-native WebSocket API for WebSocket client development, you will unlock the power of real-time communication.
Need to have Node.js on terminal to run the projects. To check if you have Node.js and npm installed, type these in your terminal:
npm -v
node -v
Follow this link if you have not installed Node.js: Install Node.js
The projects run on the ES6 version of JavaScript and require fairly recent web browser versions to run the web applications.
- To use the projects, you need to either clone the repo or download zip of the repo. Then, go to the appropriate folder to check out the project:
git clone https://github.com/sreeharsha-rav/javascript_projects.git
- To run this application, first open up a terminal. Then, run the command below:
npm install
node server.js
-
Open your local browers and type in
localhost:8080
to join ChatterBox. -
If you need to restart the server, press
ctrl + c
to stop the server and enternode server.js
again. Then, refresh browser to restart client session.
Tutorials, materials referenced from Codecademy: