Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Lerna monorepo example

This is an example monorepo that uses lerna. There are two packages in the repo: workspace-a, and workspace-b. Both packages start HTTP servers using yarn serve, each returning different responses.

Local Testing

  1. Start at the repo root
  2. Run yarn install to install all dependencies
    • Note that package.json contains a postinstall script that runs lerna bootstrap.
    • This instruct yarn to run lerna bootstrap after yarn install has finished. This allows lerna to install any required dependencies and also link the workspace-a and workspace-b 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 run lerna bootstrap.
  3. Change into either workspace directory:
    • cd packages/workspace-a; or
    • cd packages/workspace-b
  4. Run the example build command: yarn build
  5. Start the server: yarn serve

Deploying to App Platform

  1. Select your git repo
  2. Keep the source directory set to the default, /
  3. Set the build command to:
    yarn bootstrap
    cd packages/workspace-b
    yarn build
    
  4. Set the run command to:
    cd packages/workspace-b
    yarn serve
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published