aboutsummaryrefslogtreecommitdiff
path: root/cljssss-g.clj
blob: ed5d08dc182b15fc474a946726a3dbf6512bebb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(ns cljssss-g
  (require [clojure.xml :as xml]
           compojure)
  (import (org.antlr.stringtemplate StringTemplateGroup))
  (use compojure))

(def tgroup (new StringTemplateGroup ""))

(defservlet cljssss-g
  (GET "/"
    (.toString
     (doto (.getInstanceOf tgroup "index")
       (.setAttributes {"title" "Subscriptions",
                        "mainParagraph" "Hi there!"}))))
  (ANY "*"
    (page-not-found)))

(run-server {:port 8080}
  "/*" cljssss-g)