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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plug | |
## Plugs are wrappers around functions | |
```elixir | |
defmodule HelloWorld | |
use Plug | |
plug :hello | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder