webpack-react-express-template
A simple template to run webpack,react and express server
directory structure
├── client
│ ├── dist
│ │ ├── bundle.js
│ │ ├── bundle.js.LICENSE.txt
│ │ └── index.html
│ ├── package.json
│ ├── package-lock.json
│ ├── src
│ │ ├── App.js
│ │ ├── index.html
│ │ └── index.js
│ └── webpack.config.js
├── LICENSE
├── README.md
└── server
├── index.js
├── package.json
└── package-lock.json
4 directories, 14 files
Installation
- Clone the repo
cd client
npm install
to install the dependenciesnpm run serve
to run the app in development mode- The app will be served on http://localhost:3030/
npm run build
to build the app for production
Installing the express server
cd server
npm install
node index.js
to start the server- The api will be served at http://localhost:3000/api and the front end bundled app will be served at http://localhost:3000/