An Express + React starter boilerplate, based on Express Generator and Facebook Incubators' Create-React-App.
Express server runs on port: 3001 and React Frontend on port: 3000.
The React Frontend, created using create-react-app, is found inside the client directory.
- React-Redux: Predictable state container for JavaScript apps
- Redux-Thunk: Thunk middleware for Redux
- React-Router: Declarative routing for React
- Redux-Form: A Higher Order Component using react-redux to keep form state in a Redux store
- On the
rootlevel, install Node dependencies withnpm install. - Start the Node/Express.js backend server with
npm start. - On another Terminal tab, enter the
clientsubdirectory and install the dependencies withnpm install. - Start the Webpack dev-server with
npm start. - In the client's
package.jsonfile, the"proxy": "http://localhost:3001"config proxies requests form the frontend to the Express backend.
- On the
clientsubdirectory, create a production build withnpm run build. - Express was configured to point to the
builddirectory on theapp.jsfile. - Deploy your Node app and Express will automatically point to your React build.