ianhomer / try-lerna

Try Lerna

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Try Lerna

Getting started

yarn install
yarn run bootstrap
yarn start

Creating new service

Create BE API

mkdir -p services/foo/foo-api
cd services/foo/foo-api
yarn init --scope=try-lerna --yes
yarn add express --save
lerna add @try-lerna/logger --scope=@try-lerna/foo-api

Create services/foo/foo-api/index.js and add "start": "node index.js" script to package.json.

Create FE UI

cd services/foo && npx create-react-app foo-ui

Set package name in services/foo/foo-ui/package.json and add proxy through to back end port for local dev, e.g. "proxy": "http://localhost:8080".

CI/CD

Change to one microservice should only trigger specific build, e.g. wildcard path include in Azure Pipeline.

Troubleshooting

To regenerate a specific package-lock file

cd services/booking
npm install --package-lock-only

Thanks

About

Try Lerna

License:ISC License


Languages

Language:JavaScript 62.8%Language:HTML 21.0%Language:CSS 9.7%Language:TypeScript 6.2%Language:SCSS 0.4%