This is an example monorepo that uses lerna. There are two packages in the repo: workspace-c
, and workspace-d
. Both packages start HTTP servers using yarn serve
, each returning different responses.
- Start at the repo root
- Run
yarn install
to install all dependencies- Note that
package.json
contains apostinstall
script that runslerna bootstrap
. - This instruct yarn to run
lerna bootstrap
afteryarn install
has finished. This allows lerna to install any required dependencies and also link theworkspace-c
andworkspace-d
packages. By doing this as part of the install step, App Platform can cache the dependencies installed by lerna. - Important: if you do not configure a similar
postinstall
command, you will need to manually runlerna bootstrap
.
- Note that
- Change into either workspace directory:
cd packages/workspace-c
; orcd packages/workspace-d
- Run the example build command:
yarn build
- Start the server:
yarn serve
- Select your git repo
- Keep the source directory set to the default,
/
- Set the build command to:
yarn bootstrap cd packages/workspace-d yarn build
- Set the run command to:
cd packages/workspace-d yarn serve