- server resides under server directory
- react app reside under server directory inside client directory which created using create-react-app
- Express server listens locally on port 5000
- React development server listens locally on port 3000
- use npm run dev from server directory to run express and react
- concurrently package is used to run both servers. install on server directory !
- This setup will work ONLY if you add "proxy": "http://localhost:5000" to package.json of the create-react-app project
Name | Description | Invoke from server directory |
---|---|---|
start | start express server using node | npm start |
server | start express server using nodemon | npm run server |
client | start react server | npm run client |
dev | run server and client using the package concurrently | npm run dev |