Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaudinh/chat-nodejs
A simple realtime chat app with Node.js and Socket.IO
https://github.com/chaudinh/chat-nodejs
Last synced: about 4 hours ago
JSON representation
A simple realtime chat app with Node.js and Socket.IO
- Host: GitHub
- URL: https://github.com/chaudinh/chat-nodejs
- Owner: ChauDinh
- Created: 2020-03-27T14:51:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T07:45:52.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T14:42:29.737Z (over 1 year ago)
- Language: JavaScript
- Size: 3.24 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat Application with Node.js and Socket.IO
## Agenda
- Create the template with HTML/CSS/JS
- Create the server (httpServer) with Node.js and Express.js
- Implement Socket.io when client connect to server and emit/receive messages
- Deployment with Docker
## Deployment steps
- Deployment:
1. Setup server (phisically, cloud: create VPS - IP address v4)
2. Setup environment
- Setup NodeJS
- Setup yarn (npm)
- Copy code to server (compile - minify - zip), `ssh-copy`
- Install dependencies `yarn install` or `npm install`. DON'T install devdependencies, ex: `nodemon`- Setup NODE_ENV="production" or `yarn install --production`
- Run node `node index.js`
- Install `pm2` - a npm package to run background
3. Run app (pm2)
4. Out server### Build Docker Image
- Docker image: OS (Linux, nginx server, ...)
- Build docker image:
- Choosing operating system
- Setup environment
- Copy code
- Choose PORT for running app and expose this PORT