boilerplate for express + webpack stack
A minimal setup to start a server using expressjs, locally or server.
issue, question and pull request are welcome.
clone the repo and do neccessary change on output directory in webpack.config.js
yarn
yarn build:dev
yarn start:dev
- git remote add origin
$YOUR_REMOTE_GIT_URL
- git push origin master
- start your server by running
yarn
yarn build:prod
yarn start:prod
- for better continuous integrate, create a
post-receive
hook in${YOUR_REMOTE_GIT}.git/hook/post-receive
extra thanks for this friendly guide to walk through how to setup git hook
- jest unit test enable
- webpack config for both dev and prod
- eslint enabled
- hot reload enabled
- friendlier webpack logger using friendly-errors-webpack-plugin
- add react into stack (instead of adding it to stack, added an example branch for react)
- css compilation (during the time when of cssinjs getting their popularity, and I decide not include it in the stack)
- alternate api server, expectation to work with
- RESTful api
- graphql
- and maybe socket
- add more comment with description in each configuration options
- add a sample git
post-receive
hook - sharing
PORT
across webpack config and server config