This is a back end that will help me learn about front end development. Most code generated by Phoenix. It is possible to insert into the tables with:
curl -H "Content-Type: application/json" -X POST -d '{"comic": {"name":"Megatokyo","url":"http://megatokyo.com"}}' http://localhost:4000/api/comics
curl -H "Content-Type: application/json" -X POST -d '{"publish": {"day":"Mon","comic_id":"ee9515cd-e016-4c98-8818-27997eaef4b9"}}' http://localhost:4000/api/publishes
where comic_id is 'id' in the reply to the first post.
Phoenix made it very easy to add a basic front end so it is possible to visit localhost:4000/daily
to see todays comics.
To start your Phoenix server:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix