For this tutorial, we are going to write a simple Books REST API with database persistence using PostgreSQL. The requirements are to have a single endpoint on /api/books that allows CRUD operations over the books resource. By Dairon Medina Caro.
This step by step tutorial then explains:
- Prerequisites
- Getting started
- Creating the Phoenix project
- Setting up the database
- Modelling our data
- Generating the REST endpoints
- Adding the routes
- Running the App
This was all about the Phoenix REST API Tutorial, while there seems to be a lot of witchcraft and generator magic, all it does is automate the generation of boring CRUD so you can focus on your important business logic, all the generated code is very explicit and can be modified to your needs and code style. Link to the GitHub repo provided together with moore resources for anybody interested in learning Erlang and Phoenix. Nice one!
[Read More]