005-versioned-api-with-phoenix (Sept 2021)

Reference

https://elixircasts.io/versioned-api-with-phoenix

Using

  • Erlang 24.0
  • Elixir 1.12.3
  • NodeJS 14
  • Pheonix 1.5.12

What I learnt

  • There are two components for routing help function and routing:
    • as: :api to set the helper prefix
    • scope to set the actual routing, namespace and affect the file structure
  • mix phx.gen.json to generate JSON output