Skip to content
An example of notes API using Nest NodeJS framework
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
dist
docker
environments
src
test
.gitignore
.prettierrc
README.md
nest-cli.json
nodemon-debug.json
nodemon.json
package-lock.json
package.json
tsconfig.build.json
tsconfig.json
tslint.json

README.md

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

NPM Version Package License NPM Downloads Travis Linux Coverage Gitter Backers on Open Collective Sponsors on Open Collective

Description

A notes taking API example powered with Nest.

This example provides :

  • A basic Rest API
  • Unit-testing
  • Authentication with role guards
  • Form validation
  • Postgres DB integration
  • Environments configuration
  • Swagger and Compodoc integration
  • CORS and headers securities (with helmet)

Installation

$ npm install

Init Postgre database

# Launching docker container
$ docker-compose -f docker/postgres.yml up -d

# Using Initialisation script (before this, you must run the app once to create tables)
$ psql -H localhost -P 5432 -U postgres -d noteDB -f docker/postgres_init.sql

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Swagger

The app provides a Swagger client to try the note REST API at http://localhost:3000/swagger

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Documentation

# Compodoc
$ npx compodoc -p tsconfig.json -s

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

You can’t perform that action at this time.