Chatroom Server
by Docker
docker-compose up -d
Manually
npm i --no-save
npm i sequelize-cli -g
Edit the database config in config/default.js:
// ...
DB: {
REDIS: {
host: "YOUR_REDIS_HOST",
password: "PASSWORD",
// ...
},
MYSQL: {
username: "USER",
password: "PASSWORD",
host: "YOUR_MYSQL_HOST",
// ...
},
},
// ...
Create MySQL schema:
sequelize-cli db:create
sequelize-cli db:migrate
Start the server
npm run start
WebSocket handshake: Unexpected response code: 400 (nginx proxy) solution
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;