fdorantesm / pokeapi

A nestjs pokeapi client

Home Page:https://pokeapi-8jv4.onrender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A nestjs pokeapi client

https://pokeapi-8jv4.onrender.com


Languages

Language:TypeScript 94.5%Language:Shell 3.4%Language:Pug 1.0%Language:JavaScript 0.7%Language:Dockerfile 0.5%