-
Notifications
You must be signed in to change notification settings - Fork 147
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luminus template +cljs produces bug in routes.home namespace #522
Comments
cindywu
changed the title
Luminus template +cljs produces bug in routes.home
Luminus template +cljs produces bug in routes.home namespace
Jan 18, 2021
It looks like you might have an older version of the template. Might be worth checking if you have a specific version pinned in your The latest version of the template should be generating the following content for (ns new-project.routes.home
(:require
[new-project.layout :as layout]
[clojure.java.io :as io]
[new-project.middleware :as middleware]
[ring.util.response]
[ring.util.http-response :as response]))
(defn home-page [request]
(layout/render request "home.html"))
(defn home-routes []
[""
{:middleware [middleware/wrap-csrf
middleware/wrap-formats]}
["/" {:get home-page}]
["/docs" {:get (fn [_]
(-> (response/ok (-> "docs/docs.md" io/resource slurp))
(response/header "Content-Type" "text/plain; charset=utf-8")))}]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating a new luminus project using
lein new luminus new-project +cljs
produces a bug in thenew-project.routes.home
namespace.When the user runs
lein run
they will get this error:To resolve the error, go into
new-project.routes.home
and make the following change:Change
ok
toresponse/ok
.I am pretty new to Clojure(Script), but if someone points me in the right direction I can try and fix and submit a PR.
The text was updated successfully, but these errors were encountered: