Skip to content
/ nestjs-boilerplate Public template

NestJS Boilerplate with proper project file structure. It provides a sample CRUD controller, Docker and many other useful things to quickly create microservices.

License

Notifications You must be signed in to change notification settings

mkopa/nestjs-boilerplate

Repository files navigation

Nest Logo

NestJS Boilerplate

Description

NestJS Boilerplate app with Node 18+, docker-compose, Postgres, TypeORM, Joi and GitHub Actions

Endpoints:

GET - get all todos

localhost:3000/tasks

POST - create new todo

localhost:3000/tasks

BODY json payload example:
{
    "content": "some todo"
}

PATCH - set the existing "todo" as done

localhost:3000/tasks/:id

BODY json payload example:
{
    "done": true
}

DELETE - remove todo

localhost:3000/tasks/:id

Installation

$ cp .env.dist .env
$ cp docker-compose.override.yml.dist docker-compose.override.yml
$ npm install

Used Nodejs v20.9.0

Running the back-end

# start db
$ docker compose up -d postgres

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

# create a docker backend-service image and run the app
$ docker compose up

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

License

MIT licensed.

About

NestJS Boilerplate with proper project file structure. It provides a sample CRUD controller, Docker and many other useful things to quickly create microservices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published