To run in the console, without supervision trees, do the following:
$ iex -S mix
iex> Plug.Adapters.Cowboy2.http(NormalRouter, [], [dispatch: PlugDispatch.dispatch()])
To run inside a supervision tree, make sure to call child_spec
(or use a tuple) with the correct arguments, like in the following example: