It's a simple but complete API containing a CRUD to register pokemons and an endpoint to battle registered pokemons. The battle contains an algorithm to distribute more chances to the higher level pokemon. Pokemons with same level have the same odds. When the loser pokemon have the level equals 0, he's deletaded.
API: https://pokemonsapi.herokuapp.com/
Documentation: https://pokemonsapi.herokuapp.com/api-doc/
- Clone the repository
git clone https://github.com/lucas-felinto/pokemonsAPI.git
Be sure to be at the project's root folder
- Install the dependences:
npm install
- Change the .env:
cp .env.example .env
nano .env
- Starting
In the development mode:
npm run dev
In the production mode:
npm run start
- Run all tests:
npm run test
- Run integration tests:
npm run test:integration
- Run unit tests:
npm run test:unit
This project is licensed under the MIT License - see the LICENSE page for details.