Backend Implementation for the Dotdash Exercise
- Development
- Create
.env
file with theREACT_APP_SERVER_HOST
environment variable for the WebSocket server, e.g.REACT_APP_SERVER_HOST=ws://localhost:8081
- Start the UI on an open port:
PORT=8080 npm start
- Start the WebSocket server on the port you picked earlier for the server:
PORT=8081 npm run dev
- Create
- Production
- Build the UI and then start the server (which serves the built UI):
npm run build && npm run server
- Build the UI and then start the server (which serves the built UI):