I created a web app using Ring, Jetty, Enlive, Compojure.
At the end, I bundled everything together by running the command "lein
uberjar". The resulting file was 21 megs.
I scp the file to the server, then I ssh to the server. I start a "screen"
session. Inside the screen session I type :
java -jar kiosk-0.1-standalone.jar 30001
The number at the end is the port that I have it running on.
Sometimes, when people look at the app, none of the CSS files load. I have
run into this bug myself. Sometimes, when I look at the app, the Javascript
and CSS paths are broken. If I click "view source" and see the source, and
if I try to follow the links to the CSS or Javascript, then I get 404
errors.
I have this in my code:
(wrap-resource "public")
The structure of the code is:
/resources
/public
/css
/javascript
/templates
/src
/kiosk
The code is still able to find the templates in resources/templates, and
that HTML is given to Enlive, so something appears on screen. It's just the
stuff in "public" that sometimes goes missing.
Can anyone suggest why? My routes are defined like this:
(defroutes app-routes
(ANY "/" request (index request))
(GET "/search-results" request (search-results request))
(GET "/schema" [] (schema))
(GET "/account" request (account request))
(GET "/login" request (login request))
(GET "/start-over" request (start-over request))
(GET "/admin" request (admin request))
(GET "/ok" request (ok request))
(POST "/admin" request (record-new-question-if-any request))
(GET "/delete-question/:question-to-delete" request (delete-question
request))
(GET "/finish-user-sign-up" request (finish-user-sign-up request))
(route/not-found "Page not found"))
(def app
(-> app-routes
(wrap-resource "public")
(wrap-session {:cookie-name "discovery-session" :cookie-attrs
{:max-age 90 }})
(wrap-cookies)
(wrap-keyword-params)
(wrap-nested-params)
(wrap-params)))
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.