/credijusto-take-home

take home challenge

Primary LanguageJavaScript

credijusto take home challenge

How to run it

  1. Install Docker and Docker Compose on your local host machine.
  2. In the project folder, open a terminal and type docker-compose -f docker-compose.prod.yml up --build
  3. Now the web server is ready.

Endpoints

Obtaining authentication token

curl -X POST http://localhost:1337/api/token/ -H 'Content-Type: application/json' -d '{"username": "test", "password": "123456"}'

Getting exchange rates

curl -X GET http://localhost:1337/api/ -H 'Authorization: Token e18dd4c87747f68b3ddcf0561c289bcc9a68480a'

Creating a new user

curl -X POST http://localhost:1337/api/account/register/ -H 'Content-Type: application/json' -d '{"username": "newuser", "password": "123456"}'

Notes

  • Fixer free tier only allows conversions from GPB to MXN.
  • The fixer and banxico tokens are not included in the .env file.