From 7ff72c56c5e289d202fb27814efb5c882a3e9f5c Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 31 Jul 2019 00:27:20 +0200 Subject: [PATCH] Fix socket connectivity on production. Fix unused variable warnings. --- morse/lib/morse_server.ex | 2 +- ui/assets/webpack.config.js | 2 +- ui/config/prod.exs | 3 ++- ui/lib/ui_web/channels/morse_progress_channel.ex | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/morse/lib/morse_server.ex b/morse/lib/morse_server.ex index af38117..8965cdf 100644 --- a/morse/lib/morse_server.ex +++ b/morse/lib/morse_server.ex @@ -37,7 +37,7 @@ defmodule MorseServer do end @impl true - def handle_cast({:progress, new_progress}, {pid, progress}) do + def handle_cast({:progress, new_progress}, {pid, _progress}) do broadcast_progress(new_progress) {:noreply, {pid, new_progress}} end diff --git a/ui/assets/webpack.config.js b/ui/assets/webpack.config.js index 63c1d20..a233483 100644 --- a/ui/assets/webpack.config.js +++ b/ui/assets/webpack.config.js @@ -8,7 +8,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = (env, options) => ({ optimization: { minimizer: [ - new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: false }), + // new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: false }), new OptimizeCSSAssetsPlugin({}) ] }, diff --git a/ui/config/prod.exs b/ui/config/prod.exs index 1b6983b..ff57908 100644 --- a/ui/config/prod.exs +++ b/ui/config/prod.exs @@ -10,7 +10,8 @@ use Mix.Config # which you should run after static files are built and # before starting your production server. config :ui, UiWeb.Endpoint, - url: [host: "example.com", port: 80], + url: [host: "www.geokunis2.nl", port: 80], + check_origin: false, cache_static_manifest: "priv/static/cache_manifest.json" # Do not print debug messages in production diff --git a/ui/lib/ui_web/channels/morse_progress_channel.ex b/ui/lib/ui_web/channels/morse_progress_channel.ex index 80a6dcb..337a65e 100644 --- a/ui/lib/ui_web/channels/morse_progress_channel.ex +++ b/ui/lib/ui_web/channels/morse_progress_channel.ex @@ -1,7 +1,7 @@ defmodule UiWeb.MorseProgressChannel do use UiWeb, :channel - def join(channel_name, _params, socket) do + def join(_channel_name, _params, socket) do {:ok, %{hi: :there}, socket} end end