I have a static file called index.html that I\'d like to serve when someone requests /. Usually web servers do this by default, but Compojure doesn
index.html
/
(ns compj-test.core (:use [compojure.core]) (:require [ring.util.response :as resp])) (defroutes main-routes (GET "/" [] (resp/redirect "/index.html")))
What you're asking for is a redirect from / to /index.html. Its as simple as (resp/redirect target). No need to over complicate things.