I just finished a full step-by-step tutorial on how to build a JSON API with Phoenix:
- Create a new API-only Phoenix application —skip HTML and JS stuff.
- Create a User schema module (model) and hash its password —because storing plain text passwords in the database is just wrong.
- Create a Users endpoint —so you can get a list of, create or delete users!
- CORS configuration —so you can use that frontend of yours that runs on another port / domain.
- Create a Sign in endpoint —using session based authentication.
Any feedback is appreciated!
P.S. Please bear in mind I’m just starting with Elixir and Phoenix. But did my best to try to make it as clear as possible for advanced users from other frameworks (like Rails).