Core.Capability.HTTP (Elixir Server Core v0.1.1)

Copy Markdown View Source

HTTP server capability with a configurable router module.

Usage in a supervision tree

children = [
  {Core.Capability.HTTP, port: 4000, router: MyApp.Router}
]

Options

  • :port — TCP port to listen on (default: 4000)
  • :router — Plug module to route requests (default: Core.HTTP.Router)
  • :ip — IP tuple to bind (default: {0,0,0,0} = all interfaces)

Summary

Functions

child_spec(opts)