/pet_api

Pet API

Primary LanguageTypeScript

Nest Logo

Description

Nest framework TypeScript starter repository.

Installation

$ yarn install

Migrations

# Create a migration
$ npm run migration:create --name=foo

# Generate a migration from schema changes
$ npm run migration:generate --name=pet

# Run migrations and checks for schema changes
$ npm run migration:run

# Revert migrations
$ npm run migration:revert

Seed data

# Create a seed config
$ npm run seed:config

# Run seed data
$ npm run seed:run

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Docs api

# Swagger
$ http://localhost:8080/api/docs

Deploy api

# Dev
$ git checkout develop
$ git pull
$ yarn build & vercel deploy 

# Staging
$ git checkout staging
$ git pull
$ yarn build & vercel deploy 

# Production
$ git checkout main
$ git pull
$ yarn build & vercel deploy --prod