This is an official starter Turborepo.
Run the following command:
npx create-turbo@latest -e with-nestjs
This Turborepo includes the following packages/apps:
.
├── apps
│ ├── api # NestJS app (https://nestjs.com).
│ └── web # Next.js app (https://nextjs.org).
└── packages
├── @repo/api # Shared `NestJS` resources.
├── @repo/eslint-config # `eslint` configurations (includes `prettier`)
├── @repo/jest-config # `jest` configurations
├── @repo/typescript-config # `tsconfig.json`s used throughout the monorepo
└── @repo/ui # Shareable stub React component library.
Each package and application are 100% TypeScript safe.
This Turborepo
has some additional tools already set for you:
- TypeScript for static type-safety
- ESLint for code linting
- Prettier for code formatting
- Jest & Playwright for testing
This Turborepo
already configured useful commands for all your apps and packages.
# Will build all the app & packages with the supported `build` script.
pnpm run build
# ℹ️ If you plan to only build apps individually,
# Please make sure you've built the packages first.
# Will run the development server for all the app & packages with the supported `dev` script.
pnpm run dev
# Will launch a test suites for all the app & packages with the supported `test` script.
pnpm run test
# You can launch e2e testes with `test:e2e`
pnpm run test:e2e
# See `@repo/jest-config` to customize the behavior.
# Will lint all the app & packages with the supported `lint` script.
# See `@repo/eslint-config` to customize the behavior.
pnpm run lint
# Will format all the supported `.ts,.js,json,.tsx,.jsx` files.
# See `@repo/eslint-config/prettier-base.js` to customize the behavior.
pnpm format
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
npx turbo link
Learn more about the power of Turborepo: