This is a simple chat server written in Node.js (JavaScript).
npm install(dependencies)node server.mjsDEBUG=server,protocol node server.mjs(to see more logs)
- Login (without password. It is enough to send the username)
- Send message and dispatch to the correct user
- Store in memory the users with the status (online/offline)
- Store in memory the off-line messages when the user is not online
- Send the off-line messages when the user logs in
- Check if the user is already logged in
- Check if the destination user exists