Skip to content

fdorantesm/pokeapi

Repository files navigation

PokeAPI

npm nodejs nestjs GitHub license

Introduction

This service allows manage a pokedex database

Description

This project is building using NestJS and MongoDB

Nest packages:

Other featured packages:

Requirements

Technology Version
NodeJS 20.X
MongoDB 5.0

Notes:

  • There is a docker-compose.yml with mongodb dependency, just use nvm to switch node version.

Installation

  1. Install dependencies
  2. Install husky hooks
  3. Launch server

Install dependencies

yarn install

Install and configure husky

npx husky install

Launch

You can launch some architecture dependencies with Docker using Docker Compose.

Start services

yarn hello

Stop services

yarn bye
Services -
MongoDB 5.0

Documentation

Swagger View
Compodoc View
Live API View

Database population

  • POST /v1/pokemons/sync fetch all pokemons from pokeapi and save into the database.
  • POST /v1/pokemons/clean remove all pokemons from the database

Testing

Create unit testings to ensure domain is working well: happy path and handled errors.

Run unit testing band

yarn test

Run end to end testing band

yarn test:e2e