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 LearningPlug do | |
use Plug.Builder | |
plug Plug.Logger | |
plug :extract_name | |
plug :greet, %{my_option: "Hello"} | |
def extract_name(%Plug.Conn{request_path: "/" <> name} = conn, opts) do | |
assign(conn, :name, the_name(name)) | |
end |
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
# mix.exs | |
defmodule RedisRabbitElixir.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :redis_rabbit_elixir, | |
version: "0.0.1", | |
elixir: "~> 1.2", | |
build_embedded: Mix.env == :prod, |
OlderNewer