https://github.com/do-community/sample-yarn-workspaces-monorepo
https://github.com/do-community/sample-yarn-workspaces-monorepo
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/do-community/sample-yarn-workspaces-monorepo
- Owner: do-community
- Created: 2021-06-21T15:16:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-21T15:16:31.000Z (about 5 years ago)
- Last Synced: 2025-03-28T00:44:04.326Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 4
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yarn workspaces monorepo example
This is an example monorepo that uses Yarn workspaces. There are two workspaces in the repo: `workspace-a`, and `workspace-b`. Both workspaces start HTTP servers using `yarn serve`, each returning different responses.
## Local Testing
1. Start at the repo root
1. Run `yarn install` to install all dependencies
1. Change into either workspace directory:
* `cd workspace-a`; or
* `cd workspace-b`
1. Start the server: `yarn serve`
## Deploying to App Platform
1. Select your git repo
1. Keep the source directory set to the default, `/`
1. If you have a build script in `package.json`, set the build command to:
```
cd workspace-b
yarn build
```
1. Set the run command to:
```
cd workspace-b
yarn serve
```