This is the most recent and complete tutorial on how to build a JSON API using Elixir and Phoenix. Step-by-step you will create a small, but fully operational JSON API with Phoenix 1.3 and Elixir for web applications.
Created at the beginning of April, this is the most recent and complete tutorial on building JSON API with Elixir and Phoenix.
You will learn to:
- 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 through cookies.
Try it out here.