This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-22
Channels
- # announcements (2)
- # asami (123)
- # aws (17)
- # babashka (77)
- # babashka-sci-dev (23)
- # beginners (48)
- # biff (6)
- # calva (35)
- # cider (16)
- # clj-on-windows (1)
- # clj-yaml (19)
- # clojure (36)
- # clojure-europe (78)
- # clojure-nl (5)
- # clojure-norway (8)
- # clojure-poland (3)
- # clojure-uk (16)
- # clojurescript (17)
- # cursive (6)
- # datahike (3)
- # datalevin (26)
- # duct (7)
- # emacs (41)
- # events (2)
- # fulcro (7)
- # graphql (5)
- # honeysql (13)
- # juxt (3)
- # kaocha (7)
- # lsp (5)
- # malli (12)
- # off-topic (14)
- # pathom (3)
- # portal (1)
- # rdf (9)
- # reitit (3)
- # remote-jobs (2)
- # shadow-cljs (37)
- # spacemacs (5)
- # tools-build (1)
- # tools-deps (20)
- # xtdb (2)
Hi, i need reitit to serve index.html (/resources/public/index.html) on “/”. But i am getting 404.
I am sure i am missing something obvious but i cant spot it 😔.
These are my deps.edn paths
:paths ["src" "resources" "target/classes"]
and this is the code:
(defn main-routes [db]
(ring/router
["/"
["api" …]]
{:data {:muuntaja m/instance
:coercion reitit.coercion.malli/coercion
:middleware [muuntaja/format-middleware
mw/wrap-format
rrc/coerce-exceptions-middleware
rrc/coerce-request-middleware
rrc/coerce-response-middleware
exception/exception-middleware]}}))
(defn app [db]
(ring/ring-handler
(main-routes db)
(ring/routes
(ring/create-resource-handler {:path "/"})
(ring/create-default-handler))))