Created
February 14, 2018 16:20
-
-
Save ampersanda/23c3694d411f298b24cc665cb6c3f202 to your computer and use it in GitHub Desktop.
Default Clojure Handler for web page
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
;; block 1 | |
(ns sessiontest.handler | |
(:require [compojure.core :refer :all] | |
[compojure.route :as route] | |
[ring.middleware.defaults :refer [wrap-defaults site-defaults]])) | |
;; block 2 | |
;; this is the route part | |
(defroutes app-routes | |
(GET "/" [] "Hello World") ;; for / | |
(route/not-found "Not Found")) ;; 404 | |
;; block 3 | |
(def app | |
(wrap-defaults app-routes site-defaults)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment