Aino (aino v0.6.0)

Aino, an experimental HTTP framework

To load Aino, add to your supervision tree.

callback, otp_app, host, and port are required options.

environment and config are optional and passed into your token when it's created on each request.

  aino_config = %Aino.Config{
    callback: Example.Web.Handler,
    otp_app: :example,
    scheme: config.scheme,
    host: config.host,
    port: config.port,
    url_port: config.url_port,
    url_scheme: config.url_scheme,
    environment: config.environment,
    config: %{}
  }

  children = [
    {Aino.Supervisor, aino_config}
  ]

The callback should be an Aino.Handler, which has a single handle/1 function that processes the request.

otp_app should be the atom of your OTP application, e.g. :example.

host and port are used for binding and booting the webserver, and as default assigns for the token when rendering views.

environment is the environment the application is running under, similar to Mix.env().

config is a simple map that is passed into the token when created, example values to pass through this config map is your session salt.