Skip to content

Instantly share code, notes, and snippets.

@programmerShinobi
Last active October 24, 2024 15:23
Show Gist options
  • Save programmerShinobi/eedb5ce70f4378469846655249ec8c3f to your computer and use it in GitHub Desktop.
Save programmerShinobi/eedb5ce70f4378469846655249ec8c3f to your computer and use it in GitHub Desktop.
Getting started with NestJS (NestJS Series 01)

Getting Started with NestJS

Follow these steps to set up a new NestJS project:

  1. Install Yarn
    First, install Yarn globally using npm:

    npm install --global yarn
  2. Install NestJS CLI Globally
    Install the NestJS Command Line Interface globally:

    yarn global add @nestjs/cli
  3. Create a New Project
    Create a new NestJS project named nestjs-series:

    npx @nestjs/cli new nestjs-series
  4. Add Validation Libraries
    Install the class-validator and class-transformer libraries for validation:

    yarn add class-validator class-transformer
  5. Add Swagger Documentation Library
    Install the Swagger library for API documentation:

    yarn add @nestjs/swagger
  6. Add SQL ORM (TypeORM) Library
    Install TypeORM and the PostgreSQL driver:

    yarn add @nestjs/typeorm typeorm pg
  7. Add Express Platform Library
    Install the Express platform for NestJS:

    yarn add @nestjs/platform-express

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment