Skip to content

Welcome to your NestJS + SQL (Mongoose)

Project Setup

This page guides you through the essential steps to set up and run your project.

Prerequisites:

  • Node.js (version 16 or later) and npm (or yarn) installed.
  • A MongoDB with a running instance.
  • Basic familiarity with NestJS and Mongoose concepts.

1. Installation:

bash
npm install

or

bash
yarn install

2. Environment Variables:

There is a .env file in the root of your project and update the following variables with your actual database and email credentials:

MONGO_URL=

NODEMAILER_HOST=
NODEMAILER_PORT=
NODEMAILER_USER=
NODEMAILER_PASS=

FROM_EMAIL=
FRONT_END_URL=

3. Running the Application:

Development:

bash
npm run start:dev

or

bash
yarn start:dev

Production:

bash
npm run build
npm run start:prod

4. Accessing the Swagger API Document:

Open Swagger API document by entering this URL http://localhost:3000/api-docs.