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
[:head
[:title "Notes"]] [:title "Notes"]]
[:body [:body
[:h1 "Notes"] [:h1 "Notes"]
[:pre (slurp notes-file)]] [:pre (slurp notes-file)]
[:form {:action "/" :method "post"} [:form {:action "/" :method "post"}
[:input {:type "text" :name "note"}] [:input {:type "text" :name "note"}]
[:input {:type "submit" :value "Submit"}]])))) [: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)]