- Project setup include both client and server
- Lerna
- Reactjs
- Webpack
- Typescript
- Expressjs
- yarn
/---
|
|------- packages
|
|-------- client (Reactjs application)
|
|-------- server (Expressjs)
yarn
- install lerna
yarn dev
- Create local development environment
- ensure dependencies are installed
- start client project with hot reload
- start server project with hot reload
- auto open browser
yarn build
- produce build artifact to deploy to production
- ensure dependencies are installed
- build client project
- build server project
- copy client assets into server's public folder
yarn build
heroku buildpacks:clear
heroku buildpacks:add heroku/nodejs
# Keep devDependencies so that lerna will work
heroku config:set NPM_CONFIG_PRODUCTION=false
git push heroku master