- Install dependencies
yarn install / npm install
- Start backend server (express)
yarn start / npm start
- Initiate the front end (React)
node server.js
- You should now be able to connect at the designated port.
- Build the front-end
yarn build / npm build
-
Move server.js into the same directory as the build folder
-
Setup package
yarn init / npm init
- Install server dependencies (client side have already been built)
yarn add express socket.io / npm install express socket.io
- Launch server
node server.js
The active example is deployed using Heroku.For more information visit their documentation to learn how to deploy.
Note: Varying approaches could be taken. Ie, deploying the front end and back end individually + using CORS. The active example dishes the built html as well as socketio server.