我有环形库的clojure项目.这是project.clj:
(defproject words "1.0.0-SNAPSHOT"
:description "Websocket handler for sessions"
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/clojure-contrib "1.2.0"]
[aleph "0.3.0-alpha1"]
[org.clojure/data.json "0.1.2"]
[clj-redis "0.0.13-SNAPSHOT"]
[compojure "0.6.2"]
[clj-http "0.1.3"]]
:main words.play
;; Lein ring plugin will provide `lein ring server` functionality
;; (and some other relative to ring actions)
:plugins [[lein-ring "0.6.6"]]
:ring {:handler words.api/engine})
Run Code Online (Sandbox Code Playgroud)
在开发环境中,我使用2个命令运行它:lein run server lein ring server,它的工作原理.
对于生产环境,我希望最小化依赖关系并将其构建为独立jar,其中包含:
lein uberjar
Run Code Online (Sandbox Code Playgroud)
如何构建它并从一个jar文件运行两个服务器?