Build a real-time messaging server between multiple clients using NodeJS and ws library
- About
- Presentation & Examples
This api uses NodeJS version 16.14.2 and some other dependencies the versions of which are :
express : "^4.18.2",
http : "^0.0.1-security",
nodemon : "^2.0.16",
ws : "^8.11.0"
First, open the project on Visual Studio Code. Once it did, then go to terminal and type :
npm install
To launch the server, just go back to your Visual Studio Code then on terminal and type the following command :
npm start
In order to test the functioning of this project, open the index.html file in a browser or use the live server feature or extension available in VS Code.
In order to enhance to this project, just make a contribution by doing a pull request. It'll be a great pleasure to receive it.
After following the instructions above, the project structure may look like this :
Connect yourself by entering your name
Connect the other client by entering someone else name
Start texting or messaging with the other client