-
In each local
package.json
of sub-projects, only includedependencies
anddevDependencies
that required forbuild
andstart
, not fordev
. Ifdev
needs somedevDependencies
, put it in the rootpackage.json
-
With the rule above, the
build
andstart
on the cloud will have the optional speed to run
-
Install Doppler for env secrets https://docs.doppler.com/docs/install-cli
doppler login doppler setup -p backend -c prd_demo_local
-
Install dependencies
# Case 1: for all projects npm i # Case 2: for one project npm i -w apps-backend/back
-
Start dev server
# Option 1: run at root level npm run prebuild -w apps-backend/back npm run dev -w apps-backend/back # Option 2: run at project level cd apps-backend/back npm run prebuild npm run dev
-
Run dev tools (recommended before pushing any code)
npm run doctor
-
Note that we don't want to install all dependencies on prod, only install what we need
-
Option 1: run at root level
npm i -w apps-backend/back npm run build -w apps-backend/back npm start -w apps-backend/back
-
Option 2: run at project level
cd apps-backend/back npm i npm run build npm start
- Git push will trigger CI to deploy, see
ci/deploy.yml
- For
apps-frontend/web
, use scriptdeploy-dev.sh
,deploy-canary.sh
,deploy-prod.sh