项目作者: Kysan

项目描述 :
Real-time communication app
高级语言: JavaScript
项目地址: git://github.com/Kysan/Iris.git
创建时间: 2021-07-04T17:28:06Z
项目社区:https://github.com/Kysan/Iris

开源协议:

下载


Iris Messenger

Preview

Structure

Codebase Description
Batman (React) Front-end
Sasuke (express & ws) Back-end

How to setup build & run

Requirement:

  • Nodejs
  • A MongoDB

Setup DB

You need to enable Replication on your mongo db

On Debian/Ubuntu:

  • add this to mongod.conf
  1. replication:
  2. replSetName: rs0

-restart mongod
service mongod restart
-run a mongo shell and turn on replication
rs.initiate()

Turn on https

Put your RSA private key in Sasuke/ssl/privkey.pem

and your SSL certificate in Sasuke/ssl/fullchain.pem (you can get one free with letsencrypt)

Configure your server

ex:

  1. # create /Sasuke/.env
  2. # mongodb connection url
  3. DB_URL=mongodb://127.0.0.1:27017/Iris
  4. # jswon web token's secret key
  5. JWT_SECRET=putalongrandomlygeneratedstringthere
  6. # running port
  7. HTTPS_PORT=443
  8. HTTP_PORT=80

Install required dependencies

Linux: sudo sh install.sh
Windows: install.sh

Build client and run server

Linux: sudo sh start.sh
Windows: start.sh