Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.03 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.03 KB

Webpack + Express + Babel fullstack kickstart

A simple fullstack starter using webpack, express, and babel.

  • See here for a extended kickstarter with angular 1 and mongoose.

Reference/Inspiration

Install nodemon globally

npm i -g nodemon

Start in dev mode

npm i
npm start  # start express server with webpack middleware

Create distribution build

npm run build
  • Creates client-side bundle to dist/client using webpack
  • Transpiles sever-side code to dist/server using babel-cli

Serve prod code using nodemon.

npm run prod:serve  # run this after `npm run build`

Deploy and serve prod code on live server using pm2

git pull origin master
npm run build
pm2 startOrRestart pm2-prod.json