mirror of
https://github.com/mitchell/shortnr.git
synced 2025-12-17 05:17:22 +00:00
Break apart config by stage; refactor project structure
This commit is contained in:
parent
98684feb2d
commit
4d07f94e89
14 changed files with 20 additions and 18 deletions
|
|
@ -2,20 +2,12 @@ import Config
|
|||
|
||||
config :shortnr,
|
||||
port: 8080,
|
||||
ets_implementation:
|
||||
(fn
|
||||
:test -> :ets
|
||||
_ -> :dets
|
||||
end).(Mix.env())
|
||||
ets_implementation: :dets
|
||||
|
||||
config :logger, :console,
|
||||
format: "date=$date time=$time level=$level$levelpad message=\"$message\" $metadata\n",
|
||||
metadata: [:port, :file, :line, :crash_reason, :stack],
|
||||
level:
|
||||
(fn
|
||||
:prod -> :info
|
||||
_ -> :debug
|
||||
end).(Mix.env())
|
||||
level: :debug
|
||||
|
||||
config :credo,
|
||||
checks: [
|
||||
|
|
@ -23,3 +15,5 @@ config :credo,
|
|||
{Credo.Check.Refactor.MapInto, false},
|
||||
{Credo.Check.Warning.LazyLogging, false}
|
||||
]
|
||||
|
||||
import_config "#{Mix.env}.exs"
|
||||
|
|
|
|||
0
config/dev.exs
Normal file
0
config/dev.exs
Normal file
4
config/prod.exs
Normal file
4
config/prod.exs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Config
|
||||
|
||||
config :logger, :console,
|
||||
level: :info
|
||||
4
config/test.exs
Normal file
4
config/test.exs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Config
|
||||
|
||||
config :shortnr,
|
||||
ets_implementation: :ets
|
||||
Loading…
Add table
Add a link
Reference in a new issue