A project starter using Node, Express, Babel, React, Webpack that compiles ES2015
This start comes with basic Express setup routing to '/', which will serve simple React component that shows Hello World
.
Babel is setup to compile ES2015. Webpack is configured with devServer that can watch client changes for convenient development.
More features can be seen in package.json scripts.
This project starts with very basic requirements for flexibility. This project does not come with any test framework.
Install all dependencies by npm install
.
- To build only the client code (react components and client.js),
npm run build
. - To compile only server side code,
npm run compile
.
- To run devServer for client development,
npm run dev
. This will also automatically watch for changes in client code. - To run server,
npm babel-run
. This will compile & run the server.js without compiling to any output.
- To run server in production, use
npm start
, which will also triggerbuild
andcompile
to build first. Don't usenpm babel-run
in production as it results in heavy memory usage and startup performance issues.
There are several places to change the project name:
- package.json/name,description,author
- webpack.config.json/title