| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository is the backend part of the chat.
Stack:
add autostart MongoDB server
$ sudo systemctl enable mongod.serviceclone git and npm install
$ git clone https://github.com/serikoff/chat-server
$ cd chat-server
$ npm installEnvironment and PM2 setting.
$ nano ecosystem.config.jssetup example
module.exports = {
apps : [{
name: 'Server-chat',
script: 'npm',
args: 'start',
instances: 1,
autorestart: true,
watch: true,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: '3003',
JWT_SECRET: 'UpFJfpWKYteH5rMHS3st',
JWT_MAX_AGE: '7 days',
CLOUDINARY_NAME: 'name',
CLOUDINARY_API_KEY: 'key',
CLOUDINARY_API_SECRET: 'secret',
}
}]
};Registration in the Cloudinary After registering you can find in the dashboard account details and get CLOUDINARY_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET.
Use PM2 to start the server and monitor the status.
sudo pm2 start ecosystem.config.jsadd autostart server
$ sudo pm2 startup
$ sudo pm2 save| Back | FazBrowse Home | New Git URL |