zenw0lf
Building a JSON API in Elixir with Phoenix 1.5+
Hello all!
For those wanting to try your hands at Elixir / Phoenix, I wrote a comprehensive tutorial on doing a simple JSON API with said technologies.
Touches on everything: From language installation, app creation, schemas and endpoints, CORS configuration, simple authentication, to sessions (with cookies) and a bit of testing.
I updated it to latest Phoenix version:
Building a JSON API in Elixir with Phoenix 1.5+
Updated link: Build a JSON API with Phoenix · lobo_tuerto's notes
Any feedback is appreciated!
Most Liked
zenw0lf
I’m thinking about writing one about building a basic GraphQL API with Phoenix and Absinthe in Elixir.
Could also touch on writing a frontend for it using Vue.js + Apollo.
Let me know if this sounds interesting to you people.
jswny
Great tutorial! I really appreciate your style of tutorial (I can tell you have thought it through from the introduction)! I’m glad that you went through a bit of testing, which is often neglected these days. Even including things like custom 500 error pages is really nice because these are the things people just glaze over in their tutorials.
I am actually about to start a project where I need to setup Phoenix for a JSON API and I have been wondering about how to do authentication (JWT, API keys, etc.). I’m really glad I came across your tutorial since the session based method that you use seems the most simple and straight forward to me, and it’s in line with much of the authentication I’ve done in the past for Phoenix apps with interfaces.
Thanks again, great work and I really like your blog as well ![]()
Popular in Guides/Tuts
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








