FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

rmsff/chat-server: Сhat-server · GitHub

Repository files navigation

Chat server

This repository is the backend part of the chat.

Chat client

Stack:

  • NodeJS
  • TypeScript
  • Express
  • Mongoose
  • Multer
  • Nodemailer
  • Socket.io
  • JWT
  • Cloudinary
  • MongoDB

Setup

Install MongoDB

add autostart MongoDB server

$ sudo systemctl enable mongod.service

Install Node.js Install PM2

clone git and npm install

$ git clone https://github.com/serikoff/chat-server
$ cd chat-server
$ npm install

Environment and PM2 setting.

$ nano ecosystem.config.js

setup 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.js

add autostart server

$ sudo pm2 startup
$ sudo pm2 save

About

Сhat-server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL