Skip to content

Instantly share code, notes, and snippets.

@paliwodar
Created May 9, 2017 22:28
Show Gist options
  • Save paliwodar/fa95677429c37234eb5f116b23843fe6 to your computer and use it in GitHub Desktop.
Save paliwodar/fa95677429c37234eb5f116b23843fe6 to your computer and use it in GitHub Desktop.
clojure-hello
(ns clojure-hello.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[compojure.handler :as handler]))
(defroutes app-routes
(GET "/greeting" [name] (str "Hello, " (or name "World") "!"))
(route/not-found "Not Found"))
(def app
(handler/api app-routes))
(defproject bookstore-rest "0.1.0-SNAPSHOT"
:description "Clojure Hello"
:url "http://czasprogramistow.pl"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.8.0"]
[compojure "1.5.1"]
[ring/ring-json "0.4.0"]
[ring/ring-defaults "0.2.1"]]
:plugins [[lein-ring "0.9.7"]]
:ring {:handler bookstore-rest.handler/app}
:profiles
{:dev {:dependencies [[ring/ring-mock "0.3.0"]]}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment