Notes app improvement

This commit is contained in:
Michiel Borkent 2020-03-28 15:47:28 +01:00
parent 6ab803f10c
commit 5f6b26e7f3

View file

@ -41,14 +41,15 @@
(str (str
"<!DOCTYPE html>\n" "<!DOCTYPE html>\n"
(html (html
(list [:head [:html
[:title "Notes"]] [:head
[:body [:title "Notes"]]
[:h1 "Notes"] [:body
[:pre (slurp notes-file)]] [:h1 "Notes"]
[:form {:action "/" :method "post"} [:pre (slurp notes-file)]
[:input {:type "text" :name "note"}] [:form {:action "/" :method "post"}
[:input {:type "submit" :value "Submit"}]])))) [:input {:type "text" :name "note"}]
[:input {:type "submit" :value "Submit"}]]]])))
;; run the server ;; run the server
(with-open [server-socket (let [s (new ServerSocket 8080)] (with-open [server-socket (let [s (new ServerSocket 8080)]