Last active
February 5, 2016 08:44
-
-
Save rmuslimov/b8fff1f70e2fbb5f8bbf to your computer and use it in GitHub Desktop.
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
;; /src/jiracli/web.clj | |
(ns jiracli.web | |
(:require [com.stuartsierra.component :as component] | |
[ring.component.jetty :refer [jetty-server]]) | |
(:gen-class)) | |
(defn app-handler | |
"Main application server." | |
[request] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body "Hi there!"}) | |
(defn create-webserver [arg] | |
(jetty-server {:app {:handler app-handler} :port 8099})) | |
;;; src/jiracli/core.clj | |
(ns jiracli.core | |
(:require [com.stuartsierra.component :as component] | |
[jiracli.web :refer [create-webserver]]) | |
(:gen-class)) | |
(defn -main [& args] | |
(create-webserver {:port 2828})) | |
;;; project.clj | |
(defproject jiracli "0.1.0-SNAPSHOT" | |
:description "jira test" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.7.0"] | |
[com.stuartsierra/component "0.3.1"] | |
[ring/ring-core "1.4.0"] | |
[ring/ring-jetty-adapter "1.4.0"] | |
[ring-jetty-component "0.3.0"]] | |
:plugins [[jarohen/phoenix "0.1.2"]] | |
:main ^:skip-aot jiracli.core | |
:target-path "target/%s" | |
:phoenix/config "config/app.edn" | |
:profiles {:uberjar {:aot :all}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment