Skip to content

Instantly share code, notes, and snippets.

@buwilliams
Created February 2, 2014 15:38
Show Gist options
  • Save buwilliams/8770147 to your computer and use it in GitHub Desktop.
Save buwilliams/8770147 to your computer and use it in GitHub Desktop.
Hello World map to JSON
(ns mybudgetbuddy-clj.core
(:use compojure.core
ring.middleware.json
ring.util.response)
(:require
[ring.adapter.jetty :as jetty]))
(defn index [request] (response {:say "hello world"}))
(defroutes main-routes
(get "/" [] (wrap-json-response index)))
(defn -main []
(jetty/run-jetty main-routes
{:port 5000}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment