A simple Socket.io echo server for illustrating how to use cookies with Socket.io.
- Node.js v8+
- Express.js v4
- Socket.io v2
- Docker
-
You have to plug in a .env file of your own configuration (API Keys, Secret Keys and etc) in the root project folder.
-
Sample .env file:
SECRET=averystrongsecretkey
- Clone the repo
npm i
-
- Development:
npm start
- Production:
npm i -g pm2
NODE_ENV=production pm2 start index.js
- Development:
- Navigate to
http://localhost:3000
in your favorite browser
- Clone the repo.
-
- Development:
docker-compose -f docker-compose.dev.yml up
- Production:
docker-compose -f docker-compose.yml up -d
- Development:
- Navigate to
http://localhost:3000
in your favorite browser
Ⓒ Omar Doma 2019