mix phx.server working
This commit is contained in:
parent
0f1131b406
commit
840cbe251c
25
main.ex
25
main.ex
|
@ -1,7 +1,18 @@
|
||||||
|
# application
|
||||||
|
defmodule Sfe do
|
||||||
|
defmodule Application do
|
||||||
|
use Elixir.Application
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
|
def start(_type, _args) do
|
||||||
|
Logger.debug("Sfe starting...")
|
||||||
|
|
||||||
# config
|
# config
|
||||||
counter = :counters.new(1, [])
|
counter = :counters.new(1, [])
|
||||||
|
dbg(counter)
|
||||||
|
|
||||||
Application.put_env(:sfe, Sfe.Endpoint,
|
Elixir.Application.put_env(:sfe, Sfe.Endpoint,
|
||||||
http: [ip: {127, 0, 0, 1}, port: 5001],
|
http: [ip: {127, 0, 0, 1}, port: 5001],
|
||||||
pubsub_server: Sfe.PubSub,
|
pubsub_server: Sfe.PubSub,
|
||||||
adapter: Bandit.PhoenixAdapter,
|
adapter: Bandit.PhoenixAdapter,
|
||||||
|
@ -12,17 +23,7 @@ Application.put_env(:sfe, Sfe.Endpoint,
|
||||||
secret_key_base: String.duplicate("a", 64)
|
secret_key_base: String.duplicate("a", 64)
|
||||||
)
|
)
|
||||||
|
|
||||||
Application.put_env(:sfe, Sfe.HomeLive, counter_ref: counter)
|
Elixir.Application.put_env(:sfe, Sfe.HomeLive, counter_ref: counter)
|
||||||
|
|
||||||
# application
|
|
||||||
defmodule Sfe do
|
|
||||||
defmodule Application do
|
|
||||||
use Elixir.Application
|
|
||||||
|
|
||||||
require Logger
|
|
||||||
|
|
||||||
def start(_type, _args) do
|
|
||||||
Logger.debug("Sfe starting...")
|
|
||||||
|
|
||||||
children = [
|
children = [
|
||||||
Sfe.Endpoint,
|
Sfe.Endpoint,
|
||||||
|
|
Loading…
Reference in a new issue