I have an index.html
located in resources/public/index.html
and have defined the following routes (application is split up more than this, just making the code concise):
(ns example.example
(:require [compojure.route :as route]))
(defroutes routes
(GET "/" [] (resource-response "index.html" {:root "public"} "text/html")))
(defroutes application-routes
routes
(route/resources "/")
(route/not-found (resource-response "index.html" {:root "public"} "text/html")))
(def application
(wrap-defaults application-routes site-defaults))
However, when I go to localhost:8090/
it downloads the html file instead of rendering it.
If I go to localhost:8090/index.html
it renders the file properly so I assumed my routing is incorrect somehow but after looking at examples I am not too sure why.