Skip to content

littlegubs/vgmq-api

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 Support us

Description

Nest framework TypeScript starter repository.

Installation

Start Docker images

$ make start

Install dependencies

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Accounts

The fake database comes with 5 accounts with the same password: yoyo

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

database

the database can be seen at http://localhost:8080/ (user: root, password: yoyo)

Update database

When updating an Entity, TypeORM will not update the database automatically, as it is unsafe to do so. We work with migrations.

for TypeORM to be aware of Entity changes, run:

$ npm run typeorm migration:generate src/migration/whateverTitleYouWant

This command will create a file with the queries necessary to synchronize the database with your Entity.

Once this file is created, run:

$ npm run typeorm migration:run

This will run the queries inside the src/migration/whateverTitleYouWantfile

and you're done!

learn more about migrations here