Do you know when you want to use (binary) software, but you miss a feature that doesn't yet exist in its core (or the maintainers believe it doesn't make sense to implement)? With this in mind, moclojer makes it possible to extend its default behavior by using it as a library, importing the packages you need and changing the default behavior.
moclojer consists of two main features:
The specification is the main feature of moclojer, and it is the one that allows you to write the configuration of the http server in a simple and intuitive way.
We distribute the library via Clojars.
com.moclojer/moclojer {:mvn/version "0.3.0"}
[com.moclojer/moclojer "0.3.0"]
git
in deps.edn
{:deps
{com.moclojer/moclojer {:git/url "https://github.com/moclojer/moclojer.git"
:git/tag "v0.3.0"
:git/sha "84df7980a56789d1f0b03b9ee06086e4b33f28f1"}}}
(ns my-app.core
(:require [com.moclojer.adapters :as adapters]
[com.moclojer.server :as server]))
(def *router
"create a router from a config map"
(adapters/generate-routes
[{:endpoint
{:method "GET"
:path "/example"
:response {:status 200
:headers {:Content-Type "application/json"}
:body {:id 123}}}}]))
(defn -main
"start the server"
[& args]
(server/start-server! *router))
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close