NestJs Playbook

creating NestJS project and generate nest artifacts with-in monorepo.

An Introduction to NestJS

Workspace

monorepo mode

Prerequisites

Install Global Packages

npm remove -g @nestjs/cli
npm install -g @nestjs/cli

Scaffold Project

adding code dependencies

ng g node-app api --framework=nestjs --unit-test-runner=jest --tags=api-module -d

# Add nestjs
npm i  @nestjs/{common,core,microservices,swagger,websockets,typeorm,passport,elasticsearch}

# fastify-* are optional. use only if you want to replace express with fastify
npm i fastify fastify-formbody fastify-swagger

npm i -D @nestjs/testing
npm i -D @nestjs/schematics

check versions

Dependencies

adding 3rd party modules/libs

Generate Artifacts

Ref

Last updated

Was this helpful?