Day 04 - Education [Phoenix/Elixir]


  • Application: Complete and tested with five endpoints
  • CI: Complete
  • Deployment:
    • Dev: Complete
    • Production: In-progress


Back to Phoenix and Elixir for the next API. Today's focus was domain information around schools, but this time it would be a bit different. Up to this point we haven't worked with many associations. This API did have multiple associations, but the best part was Phoenix's handling of associations. When using the generators you can add the reference on the command line:

$> mix phx.gen.json Schools SchoolAlias school_alias name:string school_id:references:school

# and you get this included in your migration
add :school_id, references(:school, on_delete: :nothing)
create index(:school_alias, [:school_id])


It took no more than 2 hours to build out five endpoints, tests, CI, and docker config files.

Learnings of the day: account

We use for our exception reporting, and many of our applications are configured to have separate accounts for test environment and the production environment. On our current account we are limited to only 50 applications, of which we've used...well...50. This is problematic since it means new applications going out will not have error reporting, which is completely unacceptable. The support staff at have been great at assisting us and now we are at a choice to either throttle test environments and handle the switch to the upgraded account, or pay exponentially more for a 2XL plan. This is a bit larger of a decision than 15 in 15, and we're working with the rest of the engineering team to find the best choice to get us moving forward.

Has anyone else run into this while expanding into SOA? What did you do?

Stay tuned for our next API!