← All series

Series contents

Log in to track your progress

  1. 1. Making a site with just the Cowboy web server Episode
  2. 2. Deploying a simple Elixir app with Nanobox Episode
  3. 3. Building a router and handling static assets Episode
  4. 4. A minimal Plug.Conn clone to handle 404s Episode
  5. 5. Adding EEx templates to a Cowboy web server Episode
  6. 6. Catching EEx template errors and displaying them on the page Episode
  7. 7. Putting an Elixir OTP app in our Elixir OTP app Episode
  8. 8. Creating controllers for an Elixir web server Episode
  9. 9. Creating a DSL for our router Episode
  10. 10. Using Elixir macros to simplify our views Episode

Creating a DSL for our router

This episode is part 8 in the Zero to Framework (building Alchemist Camp) series:

Let's write some macros and make a nice router DSL! Update: Thanks to Micah for pointing out that the var! is unneeded since we don't need to modify conn outside the macro.

Open standalone page ↗

No Comments