Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active May 1, 2017 19:25
Show Gist options
  • Save sw-samuraj/4b6a464de41a79d1fd3cd833bfe129c4 to your computer and use it in GitHub Desktop.
Save sw-samuraj/4b6a464de41a79d1fd3cd833bfe129c4 to your computer and use it in GitHub Desktop.
An example of plain Ring handler (for a blog post).
(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