-
-
Save KirinDave/bcac547ff8ebfde2c982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn dump-sesh [request] | |
{:body (str "<html><head><title>ok</title></head></body>Seshtown: " (:session request)) | |
:session {:x 1}}) | |
(defroutes main-app | |
(RESOURCE "css" "css") | |
(RESOURCE "js" "javascript") | |
(RESOURCE "(png|jpg|gif)" "images") | |
(GET "/t1" (with-session dump-sesh)) | |
(ANY "/" (with-league (get-league! "default") | |
(league-home))) | |
(ANY "*" "Fell Through!")) | |
(defn start-server | |
([port] (run-server {:port port} "/*" (servlet (with-session main-app)))) | |
([] (start-server 8080))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment