From 30da8f31b5eb2a92daf549782da4b7e48b715cb9 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Mon, 11 Jun 2018 18:36:16 -0300 Subject: [PATCH] add static/index.html --- lib/cowboy.ex | 2 +- static/index.html | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 static/index.html diff --git a/lib/cowboy.ex b/lib/cowboy.ex index b9855df..38d8b8e 100644 --- a/lib/cowboy.ex +++ b/lib/cowboy.ex @@ -30,7 +30,7 @@ defmodule Elstat.Cowboy do def build_dispatch_config do :cowboy_router.compile([ {:_, [ - {"/", :cowboy_static, {:priv_file, :my_app, "static/index.html"}}, + {"/", :cowboy_static, {:file, "static/index.html"}}, {"/hewwo", Elstat.Cowboy.DefaultHandler, []}, {"/api/current_status", Elstat.API.Status, []}, diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..c11b20e --- /dev/null +++ b/static/index.html @@ -0,0 +1,72 @@ + + + + + + + + + + +