Skip to content

adairAcevedo/prueba_tecnica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PruebaTecnica

TODO: Add description

  • Elixir 1.15.7-otp-24
  • Erlang 24.0.2
  • PostgrestSql 14.9
  • NodeJs 12.22.9

If you use package manager like asdf you can use it.

Steps to config project enviroment

  1. Set enviroment in .env file and run source .env
  2. Install all dependences to Elixi project with mix deps.get
  3. Go to apps/api un run command mix setup to create Db
  4. Run proyect with mix phx.server
  5. Dashboard run in http://localhost:8080"
  6. Api run in http://localhost:4001"

Apitoken default "kFYqXqXC9YdzVMHyaEYP9SKSQx7PcPFy" Api token limit 40 requests per hour

Weather get from openweathermap

Api routes Examples

Compound Interest

curl --request POST \
  --url http://localhost:4001/calcular-intereses \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/8.3.0' \
  --header 'X-API-TOKEN: kFYqXqXC9YdzVMHyaEYP9SKSQx7PcPFy' \
  --data '{
  "principal": 1000,
  "tasa_anual": 0.05,
  "periodos": 1
}'

Jokes

curl --request GET \
  --url http://localhost:4001/jokes/random \
  --header 'User-Agent: insomnia/8.3.0' \
  --header 'x-api-token: kFYqXqXC9YdzVMHyaEYP9SKSQx7PcPFy'

Weather

curl --request GET \
  --url http://localhost:4001/weather/cancun \
  --header 'User-Agent: insomnia/8.3.0' \
  --header 'x-api-token: kFYqXqXC9YdzVMHyaEYP9SKSQx7PcPFy'

About

Prueba resuelve

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published