Last active
May 13, 2016 21:11
-
-
Save bendyorke/e41fa274727e30a12dc63b73b15399be to your computer and use it in GitHub Desktop.
Fully featured clojure web server in 10 lines of code
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
#! /usr/bin/env boot | |
(set-env! :dependencies '[[compojure "1.5.0"] | |
[http-kit "2.1.8"]]) | |
(require '[compojure.core :refer [defroutes GET]]) | |
(require '[org.httpkit.server :refer [run-server]]) | |
(defroutes routes | |
(GET "/" [] "Hello World!")) | |
(run-server routes {:port 9001}) | |
(boot (wait)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment