Skip to content

peadarkelly/nest-api

Repository files navigation

Nest Logo

Description

NestJS example REST API with Swagger integration.

Once the app is started, go to http://localhost:<port>/docs/ to view the Swagger docs

Two folder structures are available:

  • Group by type - here (default)
  • Group by module - here

Setup

$ npm install

Create Postgres database and set the following environment variables to the appropriate values:

  • PG_HOST
  • PG_DATABASE
  • PG_USER
  • PG_PASSWORD
  • PG_PORT

Configure the PORT environment variable to chnage the Port that the app listens on (default 3001)

Running the app

# compile app
$ npm run buld

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# lint plus unit tests
$ npm test

# unit tests only
$ npm run test:unit

# integration tests
$ npm run test:integration

About

NestJS Example API with Swagger integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •