Skip to content
AI Monorepos Free online conference · June 23 Join us!

NestJS API template

A structured NestJS REST API built with the oxc toolchain.

Terminal window
npx create-nx-workspace@latest my-workspace --template nrwl/nestjs-template
NestJS API template preview

A NestJS API laid out for growth: modules, controllers, and a shared types library, built with the Rust-based oxc toolchain for fast compiles and a Dockerfile ready to ship. Nx orchestrates the oxc build as a task, so you get caching and affected on top. A solid backend foundation that slots into any front end.

Highlights

Opinionated structure

Modules and controllers organized the Nest way, with a shared types library for DTOs.

oxc-fast builds

The Rust-based oxc toolchain compiles the API quickly, wired as an Nx task so builds are cached and affected-aware.

Container-ready

A Dockerfile and health endpoint are included so you can deploy on day one.

Quickstart

  • Serve the API:
    Terminal window
    npx nx run api:serve
  • Test every project:
    Terminal window
    npx nx run-many -t test
  • Visualize your monorepo's graph in the browser:
    Terminal window
    npx nx graph

What's inside

  • apps/api - NestJS REST API with sample resources
  • packages/types - shared DTO + type library
  • A Dockerfile for the API

Speed up CI with Nx Cloud

Connect this monorepo to Nx Cloud to share one remote cache across your team and CI, and distribute tasks across machines as it grows.

  • Remote caching shared across your team and CI
  • Distributed task execution with Nx Agents
  • Automated e2e test splitting
  • CI that detects failures and proposes fixes

Learn more