Skip to content
A self contained chat server running on node, based on websocket
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status


A self contained chat server running on node, based on WebSocket. This server currently has many bugs and security holes. It's currently aimed as an experiment on WebSockets and node.js capability to handle socket connections. The code is also currently poorly commented.

How to run

In order to run this server, you will need node.js installed in your system. After installing node.js (make sure you have npm installed) you have run,

npm install

Then you can simply write in command line while inside the node_chat directory.

node chatServer.js

To make a docker image named node_chat



docker run -p 7777:7777 -d node_chat

There is a pre-slashed BASE_URI environment variable option.

Start chatting! Simply give the URL as to your friends and they can join in. The URL should be in this format, http://your_ip_address:7777. In your browser you can put http://localhost:7777 to connect to the chat.

How to change the default port

By default if you will run on port 7777. You can change is by simply chaging number in chatServer.js (line 47). The line looks like this,

server.listen(7777, function() {

Thanks to The server code is based on this tutorial...

You can’t perform that action at this time.