about summary refs log tree commit diff
path: root/assessments/semiprimes/server/mix.exs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-12-12T01·04+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-12-12T01·04+0000
commit714ec29743bd90257ed7607635abe885df01267d (patch)
treef89609c53248ff43f8d336c0afa33f24aa0e613c /assessments/semiprimes/server/mix.exs
parentc0a88ba7d5524fdaca5d32241676b8bb26e6c3eb (diff)
Define Cache and convert app to OTP
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`
Diffstat (limited to 'assessments/semiprimes/server/mix.exs')
-rw-r--r--assessments/semiprimes/server/mix.exs3
1 files changed, 2 insertions, 1 deletions
diff --git a/assessments/semiprimes/server/mix.exs b/assessments/semiprimes/server/mix.exs
index 0efb638e1728..2bbd357c3854 100644
--- a/assessments/semiprimes/server/mix.exs
+++ b/assessments/semiprimes/server/mix.exs
@@ -14,7 +14,8 @@ defmodule Server.MixProject do
   # Run "mix help compile.app" to learn about applications.
   def application do
     [
-      extra_applications: [:logger]
+      extra_applications: [:logger],
+      mod: {App, []}
     ]
   end