Last active
May 1, 2017 19:25
-
-
Save sw-samuraj/4b6a464de41a79d1fd3cd833bfe129c4 to your computer and use it in GitHub Desktop.
An example of plain Ring handler (for a blog post).
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
(ns blog-ring.core | |
(:require [ring.adapter.jetty :as jetty])) | |
(defn handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body "<h1>Hello, world!</h1>"}) | |
(defn -main [] | |
(jetty/run-jetty handler | |
{:port 3000})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment