Skip to content
Websocket 实时消息服务器 | Websocket instant messaging server based on Node.js
HTML JavaScript
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.
public Update docs Oct 8, 2019
.gitignore init Mar 27, 2019
LICENSE init Mar 27, 2019 Update docs Oct 8, 2019
config.json init Mar 27, 2019
package.json Update package.json Oct 13, 2019
renovate.json Add renovate.json Mar 29, 2019
server.js Update docs Oct 8, 2019

Mimi Chat

Websocket server based on Node.js


# Clone this repository
git clone
# Go into the repository
cd mimi-chat
# Install dependencies
npm install


npm start


node server.js

Default config file is config.json. If you want to specify another config file, you can take it as the third argument, e.g.

node server.js /path/to/your/config.json


Server options (in config.json):

Option Available value Description
port integer set the listening port (default: 9000)
debug true / false show logs in the console in order to debug
multi_log true / false write logs to different files accroading to the channel
single_log true / false write logs to a single file

Client (samples are in the public folder):

var ws = new WebSocket("ws://localhost:9000", headers = channel);
//If you're using ssl, replace ws with wss
//You can replace "localhost" with your ip or hostname, clients in the same channel can send messages to each other
ws.onopen = function() {
	//Do something...
ws.onmessage = function(event) {
	var msg = JSON.parse(;
	//You will receive msg.type and msg.content here
	//Do something...
ws.onerror = function() {
	//Do something...


  • Mimi Developer of this project.


Released under the GNU General Public License v3

Todo List

  • 支持发送图片
  • Gravatar头像
You can’t perform that action at this time.