Skip to content

jessicauk/newsletter-backend

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Donate us Support us Follow us on Twitter

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Running Docker

# development
$ docker pull postgres:16

# build
$ docker build -t newsletter-backend-app .

# build and run
$ docker compose -f docker-compose.yaml up --build

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Migrations

# install CLI
$ npm i -g typeorm

# install ts-node
$ npm install ts-node --save-dev

# create migration
$ typeorm migration:create src/migrations/name-migration

# running migration
$ typeorm migration:run -- -d src/config

# revert migration
$ typeorm migration:revert -- -d src/config

test coverage

$ npm run test:cov

License

Nest is MIT licensed.