This site uses third-party cookies, learn more or accept
dark light

Websockets and stuff

Written by Max Pelic on

I recently started learning how to create Websockets with NodeJS, and I've been experimenting with an anonymous web chat app. After a lot of debugging and trying to get it published, I finally have at up and running at chat16.herokuapp.com.

How does it work?

I set up a free account on heroku, and created a Node.js file that runs a websocket and serves the static files.

It's a user-moderated web chat, where each user is assigned a base16 string of characters based on their IP address and browser. The can post messages in the chat, but users also have the option to create a "ban request", and if enough ban requests are submitted, the user is banned and cannot send any more messages. To keep users from banning everyone, they can also submit an "allow request", and after enough of those the user is allowed to chat again.

Share this article:

Previous Article: Moving away from AMP

Next Article: CSS powered digital clock