/Wisemen-Pokedex-api

Wisemen | NestJS - Pokédex API

Primary LanguageTypeScript

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

$ npm install

Environment setup

Copy .env.example to .env and configure the variables.

Setup database

# docker
$ docker compose --env-file .\.env up -d

Run migrations (see Migrations)

Seed with data (see Seeding)

Commands

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Migrations

# generate
$ npm run migration:generate --name=name

# run
$ npm run migration:run

# revert
$ npm run migration:revert

Seeding

# seed
$ npm run seed

Import pokemon from pokeapi

# import pokemon by name or id
$ npm run import:pokemon NameOrID
    - # example: $ npm run import:pokemon 1
    - # example: $ npm run import:pokemon bulbasaur

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

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.