714ec29743
Define a simple in-memory key-value store for our cache. TL;DR: - Define `Cache` as a simple state-keeping `Agent` - Define `Sup`, which starts our Cache process - Define `App`, which starts our Supervisor process - Whitelist `App` in `mix.exs`, so that it starts after calling `iex -S mix`
28 lines
512 B
Elixir
28 lines
512 B
Elixir
defmodule Server.MixProject do
|
|
use Mix.Project
|
|
|
|
def project do
|
|
[
|
|
app: :server,
|
|
version: "0.1.0",
|
|
elixir: "~> 1.10",
|
|
start_permanent: Mix.env() == :prod,
|
|
deps: deps()
|
|
]
|
|
end
|
|
|
|
# Run "mix help compile.app" to learn about applications.
|
|
def application do
|
|
[
|
|
extra_applications: [:logger],
|
|
mod: {App, []}
|
|
]
|
|
end
|
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
defp deps do
|
|
[
|
|
{:cortex, "~> 0.1", only: [:dev, :test]}
|
|
]
|
|
end
|
|
end
|