Skip to content

Instantly share code, notes, and snippets.

Plug

A connection is a common record across all functions

Functions are a series of transformations on the connection. A connection will have some convenience areas for a problem domain (initially, web servers), and a dictionary for user data. There will also be an API for conveniently transforming the connection.

# Plug
## Plugs are wrappers around functions
```elixir
defmodule HelloWorld
use Plug
plug :hello
defmodule App do
use Plug
# I use power_strip as a collection of plugs... could use stack
# I use spark to actually fire a connection
# alternatives source,
use Authentication.Appliance
power_strip Request #defaults to :request