Skip to content
Snippets Groups Projects
Commit dc45b0db authored by Cam Saül's avatar Cam Saül
Browse files

More useful error message if index.html is missing when running `lein

ring server` :unamused: #2195
parent 5c9a3a50
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,9 @@
(defn- index [_]
(-> (if (@(resolve 'metabase.core/initialized?))
(stencil/render-string (slurp (io/resource "frontend_client/index.html"))
(stencil/render-string (slurp (or (io/resource "frontend_client/index.html")
;; Occasionally people try to launch from 'lein ring server' and move stuff around. In that case give them a useful error message.
(throw (Exception. "Cannot find './resources/frontend_client/index.html'."))))
{:bootstrap_json (json/generate-string (setting/public-settings))})
(slurp (io/resource "frontend_client/init.html")))
resp/response
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment