Turborepo starter

This is an official Yarn v3 starter turborepo.

What's inside?

This turborepo uses Yarn as a package manager. It includes the following packages/apps:

Apps and Packages

  • api: a Nest.js backend app
  • nest-config: a package that contains all configs for nest apps and packages
  • odm: a package that contains an abstraction to use mongoose with nest

Each package/app is 100% TypeScript.

Utilities

This turborepo has some additional tools already setup for you:

Setup

This monorepo use env variables, start by creating a .env file :

touch .env

Then file the following variables with your correct settings:

MONGO_ROOT_USER=your mongo root user for mongo express
MONGO_ROOT_PASSWORD=your mongo root password for mongo express
MONGO_EXPRESS_PORT=your mongo express port usualy 8081
MONGO_HOST=your mongodb host usualy localhost
MONGO_PORT=your mongodb port usualy 27017
MONGO_USER=your mongodb user
MONGO_PASSWORD=your mongodb password
MONGO_DATABASE=your mongodb database

You can now run docker-compose if you don't already have a running mongo database:

docker-compose up -d

To install all packages, run the following command:

yarn

Build

To build all apps and packages, run the following command:

yarn run build

Develop

To develop all apps and packages, run the following command:

yarn run start:dev

Useful Links

Learn more about other libs used in the project :

Learn more about the power of Turborepo: