Created
October 15, 2025 23:42
-
-
Save andradefil/86d412bde01c8fff74735105f9d00d23 to your computer and use it in GitHub Desktop.
Serve a Static Clojure Website
This file contains hidden or 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
| (require '[org.httpkit.server :as server] | |
| '[hiccup2.core :as h]) | |
| (def content | |
| (str (h/html | |
| [:meta {:charset "UTF-8"}] | |
| [:head | |
| [:script {:src "https://livejs.com/live.js" :type "text/javascript"}]] | |
| [:body {:style {:background-color :black, :text-align :center}} | |
| [:img {:src "https://github.com/clojurehackers/website/blob/main/assets/logo.jpg?raw=true", :align :center}] | |
| [:h1 {:style {:color :red}} "ClojureHackers"] | |
| [:h2 {:style {:color :red}} "A HACKER SPACE ABOUT CLOJURE!!!"] | |
| [:h2 {:style {:color :red}} "Clojure is Love <3"] | |
| [:p {:style {:color :red}} | |
| "Everyone thinks about that as being something weird! | |
| but it is not you know when we have everything writing in a way that makes sense"] | |
| [:p {:style {:color :blue}} | |
| "Another Paragraph about the simplicity and power of this language."]]))) | |
| (def serve | |
| (server/run-server | |
| (fn [_] | |
| {:status 200 | |
| :body content | |
| :headers {"Content-Type" "text/html"}}) | |
| {:port 3006})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment