The Fiqus bio species API 🐦 🌿 done with ❤️ This app is focused to be an Open API for biological species and part of a quizzes game about birds.
- Change in
dev.exs
the databasehostname:
from localhost to"postgres"
. - Create the docker image and power up the services:
docker-compose up -d --build
- If your DB table still does not exist:
docker-compose exec narosky_api mix ecto.create
- And run the migrations:
docker-compose exec narosky_api mix ecto.migrate
- Start the server!
docker-compose exec narosky_api mix phx.server
You might need to run all with sudo
(depending your local configuration).
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
http://localhost:4000/admin/users/new
http://localhost:4000/admin/species
http://localhost:4000/api/species
http://localhost:4000/api/quiz/pampas
Access to the client http://localhost:4000/graphiql
.
Query example:
{
species {
id
nameEs,
sciName
}
}
using matching
{
species(matching: "hor") {
id
nameEs,
sciName
}
}
- Official website: http://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix