A Clojure library for JSON-RPC 2.0 protocol
Leiningen/Boot
[clj-jsonrpc "0.1.1-dev"] ;; use the latest version number
Gradle
compile "clj-jsonrpc:clj-jsonrpc:${version-number}"
Maven
<dependency>
<groupId>clj-jsonrpc</groupId>
<artifactId>clj-jsonrpc</artifactId>
<version>${version-number}</version>
</dependency>
Demo Usage
(def rpc-handlers {
:sum (fn [& params] (apply + params))
})
(jsonrpc/defhandlers rpc-server/rpc-conn
rpc-handlers)
(defn run-jetty-demo-server [& args]
(println "hello, jetty demo")
(run-jetty #'rpc-server/app {:port 8080}))
Copyright © 2017 zoowii
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.