acme_ex v0.3.1 AcmeEx.Router View Source
The test ACME server. Add this to your supervision tree by calling
AcmeEx.Router.child_spec()
Available opts include:
adapter
- Defaults based on which version of cowboyport
- Defaults to4002
site
- Defaults tohttp://localhost:{port}
For example, to run on a different port, you would call
AcmeEx.Router.child_spec(port: 4003)
Link to this section Summary
Functions
Determine the web adapter to use. It will default based on the version of cowboy you are using
Callback implementation for Plug.call/2
Generate a child_spec to be supervised. Available opts include
Callback implementation for Plug.init/1
Determine the Acme port
to run on. This will default to 4002 if none provided
Determine the Acme site
URL. You can provide this directly
when you start the app using
Link to this section Functions
Determine the web adapter to use. It will default based on the version of cowboy you are using.
Examples
iex> AcmeEx.Router.adapter([])
Plug.Adapters.Cowboy2
iex> AcmeEx.Router.adapter([adapter: Plug.Adapters.Cowboy])
Plug.Adapters.Cowboy
iex> AcmeEx.Router.adapter([adapter: "Cowboy2"])
Plug.Adapters.Cowboy2
Callback implementation for Plug.call/2
.
Generate a child_spec to be supervised. Available opts include:
adapter
- Defaults based on which version of cowboy you are runningport
- Defaults to4002
site
- Defaults tohttp://localhost:{port}
Callback implementation for Plug.init/1
.
Determine the Acme port
to run on. This will default to 4002 if none provided.
Examples
iex> AcmeEx.Router.port([])
4002
iex> AcmeEx.Router.port([port: 4848])
4848