TDD Exchange API
Rest API made in MongoDB, Nestjs, using TDD (Test Driven Development), TypeORM and TypeScript.
Requisits to run this project
- docker
- docker-compose
- npm
Running the app
$ npm i
$ docker-compose up --build
# listening in http://localhost:3000
Test
# unit tests
$ npm run test
# test coverage
$ npm run test:coveralls
Endpoints
Currency exchange
GET
http://localhost:3003/exchange/?from=USD&to=BRL&amount=1
Create Currency
POST
http://localhost:3003/currencies/
Put values in body:
currency=BRL
value=0.2
Update Currency Value
PATCH
http://localhost:3003/currencies/BRL/value
Put value in body:
value=0.22
Delete Currency
DELETE
http://localhost:3003/currencies/BRL