Migrate from channel to phoenix live view.
Move phoenix config to ui project. Sync progress on page load.
This commit is contained in:
parent
e888f1330b
commit
ad24ec96ac
26 changed files with 120 additions and 164 deletions
|
@ -26,13 +26,6 @@ config :shoehorn,
|
|||
|
||||
config :logger, backends: [RingLogger]
|
||||
|
||||
config :phoenix, :json_library, Jason
|
||||
import_config("target.exs")
|
||||
|
||||
config :morse, :progress_socket, UiWeb.UserSocket
|
||||
|
||||
if Mix.target() != :host do
|
||||
"target.exs"
|
||||
else
|
||||
"host.exs"
|
||||
end
|
||||
|> import_config()
|
||||
import_config("../../ui/config/config.exs")
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
use Mix.Config
|
||||
|
||||
config :ui, UiWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
secret_key_base: "FkfuB09FEncz4aAi6hS6w5bsNast+D1P12MckXr5dlRdhtFJrKqgEhvhpTU3qzgh",
|
||||
render_errors: [view: UiWeb.ErrorView, accepts: ~w(html json)],
|
||||
pubsub: [name: Ui.PubSub, adapter: Phoenix.PubSub.PG2],
|
||||
http: [port: 4000],
|
||||
server: true,
|
||||
debug_errors: true,
|
||||
code_reloader: true,
|
||||
check_origin: false,
|
||||
watchers: [
|
||||
node: [
|
||||
"node_modules/webpack/bin/webpack.js",
|
||||
"--mode",
|
||||
"development",
|
||||
"--watch-stdin",
|
||||
cd: Path.expand("../assets", __DIR__)
|
||||
]
|
||||
]
|
||||
|
||||
config :ui, UiWeb.Endpoint,
|
||||
live_reload: [
|
||||
patterns: [
|
||||
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
~r"priv/gettext/.*(po)$",
|
||||
~r"lib/ui_web/{live,views}/.*(ex)$",
|
||||
~r"lib/ui_web/templates/.*(eex)$"
|
||||
]
|
||||
]
|
||||
|
||||
config :logger, :console, format: "[$level] $message\n"
|
||||
|
||||
# Set a higher stacktrace during development. Avoid configuring such
|
||||
# in production as building large stacktraces may be expensive.
|
||||
config :phoenix, :stacktrace_depth, 20
|
||||
|
||||
# Initialize plugs at runtime for faster development compilation
|
||||
config :phoenix, :plug_init_mode, :runtime
|
|
@ -37,18 +37,6 @@ config :nerves_init_gadget,
|
|||
node_name: node_name,
|
||||
node_host: :mdns_domain
|
||||
|
||||
config :ui, UiWeb.Endpoint,
|
||||
url: [host: "www.geokunis2.nl"],
|
||||
http: [port: 80],
|
||||
secret_key_base: "HEY05EB1dFVSu6KykKHuS4rQPQzSHv4F7mGVB/gnDLrIu75wE/ytBXy2TaL3A6RA",
|
||||
root: Path.dirname(__DIR__),
|
||||
server: true,
|
||||
render_errors: [view: UiWeb.ErrorView, accepts: ~w(html json)],
|
||||
pubsub: [name: Nerves.PubSub, adapter: Phoenix.PubSub.PG2],
|
||||
code_reloader: false
|
||||
|
||||
config :morse, :relay_pin, 17
|
||||
|
||||
if File.exists?("config/secrets.exs") do
|
||||
import_config "secrets.exs"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue