Revert to 56e05fced

This commit is contained in:
Pim Kunis 2019-07-31 13:16:53 +02:00
parent 4569869d6a
commit 510cdcbc9c
7 changed files with 16 additions and 6 deletions

View file

@ -5,8 +5,6 @@
# is restricted to this project. # is restricted to this project.
use Mix.Config use Mix.Config
import_config "../../ui/config/config.exs"
config :firmware, target: Mix.target() config :firmware, target: Mix.target()
# Customize non-Elixir parts of the firmware. See # Customize non-Elixir parts of the firmware. See
@ -28,6 +26,16 @@ config :shoehorn,
config :logger, backends: [RingLogger] config :logger, backends: [RingLogger]
config :ui, UiWeb.Endpoint,
url: [host: "localhost"],
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 :phoenix, :json_library, Jason config :phoenix, :json_library, Jason
if Mix.target() != :host do if Mix.target() != :host do

View file

@ -37,7 +37,7 @@ defmodule MorseServer do
end end
@impl true @impl true
def handle_cast({:progress, new_progress}, {pid, _progress}) do def handle_cast({:progress, new_progress}, {pid, progress}) do
broadcast_progress(new_progress) broadcast_progress(new_progress)
{:noreply, {pid, new_progress}} {:noreply, {pid, new_progress}}
end end

View file

@ -8,7 +8,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = (env, options) => ({ module.exports = (env, options) => ({
optimization: { optimization: {
minimizer: [ minimizer: [
// new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: false }), new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: false }),
new OptimizeCSSAssetsPlugin({}) new OptimizeCSSAssetsPlugin({})
] ]
}, },

View file

@ -9,6 +9,7 @@ use Mix.Config
# Configures the endpoint # Configures the endpoint
config :ui, UiWeb.Endpoint, config :ui, UiWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "FkfuB09FEncz4aAi6hS6w5bsNast+D1P12MckXr5dlRdhtFJrKqgEhvhpTU3qzgh", secret_key_base: "FkfuB09FEncz4aAi6hS6w5bsNast+D1P12MckXr5dlRdhtFJrKqgEhvhpTU3qzgh",
render_errors: [view: UiWeb.ErrorView, accepts: ~w(html json)], render_errors: [view: UiWeb.ErrorView, accepts: ~w(html json)],
pubsub: [name: Ui.PubSub, adapter: Phoenix.PubSub.PG2] pubsub: [name: Ui.PubSub, adapter: Phoenix.PubSub.PG2]

View file

@ -10,7 +10,7 @@ use Mix.Config
# which you should run after static files are built and # which you should run after static files are built and
# before starting your production server. # before starting your production server.
config :ui, UiWeb.Endpoint, config :ui, UiWeb.Endpoint,
url: [host: "www.geokunis2.nl", port: 80], url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/cache_manifest.json" cache_static_manifest: "priv/static/cache_manifest.json"
# Do not print debug messages in production # Do not print debug messages in production

View file

@ -12,6 +12,7 @@ secret_key_base =
""" """
config :ui, UiWeb.Endpoint, config :ui, UiWeb.Endpoint,
http: [:inet6, port: String.to_integer(System.get_env("PORT") || "4000")],
secret_key_base: secret_key_base secret_key_base: secret_key_base
# ## Using releases (Elixir v1.9+) # ## Using releases (Elixir v1.9+)

View file

@ -1,7 +1,7 @@
defmodule UiWeb.MorseProgressChannel do defmodule UiWeb.MorseProgressChannel do
use UiWeb, :channel use UiWeb, :channel
def join(_channel_name, _params, socket) do def join(channel_name, _params, socket) do
{:ok, %{hi: :there}, socket} {:ok, %{hi: :there}, socket}
end end
end end