mix phx.server working
This commit is contained in:
parent
0f1131b406
commit
840cbe251c
33
main.ex
33
main.ex
|
@ -1,19 +1,3 @@
|
|||
# config
|
||||
counter = :counters.new(1, [])
|
||||
|
||||
Application.put_env(:sfe, Sfe.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 5001],
|
||||
pubsub_server: Sfe.PubSub,
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
debug_errors: true,
|
||||
code_reloader: true,
|
||||
server: true,
|
||||
live_view: [signing_salt: "aaaaaaaa"],
|
||||
secret_key_base: String.duplicate("a", 64)
|
||||
)
|
||||
|
||||
Application.put_env(:sfe, Sfe.HomeLive, counter_ref: counter)
|
||||
|
||||
# application
|
||||
defmodule Sfe do
|
||||
defmodule Application do
|
||||
|
@ -24,6 +8,23 @@ defmodule Sfe do
|
|||
def start(_type, _args) do
|
||||
Logger.debug("Sfe starting...")
|
||||
|
||||
# config
|
||||
counter = :counters.new(1, [])
|
||||
dbg(counter)
|
||||
|
||||
Elixir.Application.put_env(:sfe, Sfe.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 5001],
|
||||
pubsub_server: Sfe.PubSub,
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
debug_errors: true,
|
||||
code_reloader: true,
|
||||
server: true,
|
||||
live_view: [signing_salt: "aaaaaaaa"],
|
||||
secret_key_base: String.duplicate("a", 64)
|
||||
)
|
||||
|
||||
Elixir.Application.put_env(:sfe, Sfe.HomeLive, counter_ref: counter)
|
||||
|
||||
children = [
|
||||
Sfe.Endpoint,
|
||||
{Phoenix.PubSub, name: Sfe.PubSub}
|
||||
|
|
Loading…
Reference in a new issue