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.
- Set enviroment in
.env
file and runsource .env
- Install all dependences to Elixi project with
mix deps.get
- Go to apps/api un run command
mix setup
to create Db - Run proyect with
mix phx.server
- Dashboard run in
http://localhost:8080"
- 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'