Monorepo installation
Enso promotes developing in a monorepo to encourage developers to think about how their application can be composed and how other services will be interacting with their application.
While a full blown microservice architetcure may be overkill for the majority of projects, there is enough of an upside in adopting the monorepo approach even if it just just for sharing API response types with other services.
β
# Clone the starter repository
git clone https://github.com/ensojs/monorepo-install.git enso-monorepo
# move into the directory
cd enso-monorepo
# bootstrap learna + packages
# Note: sometimes the lerna bootstrap process hangs with
# "warning Waiting for the other yarn instance to finish (number)"
yarn
# verify packages installed correctly
cd packages/http-server && yarn
# setup your environment
cp .env.example .env
# start the server
yarn dev
All too easy
At this point the http-server
is working exactly the same as the clean installation, just working within a monorepo!.
Some notes for consideration
- The monorepo comes preconfigured with TypeScript working as a transpiler
- All packages are found under
packages/**
- The monorepo has adopts the Standard JS style
Next steps
Letβs pick some Recipes to enhance the functionality of our service.