Liking cljdoc? Tell your friends :D

Roll metaframework

roll /ˈrōl/

informal. to begin to move or operate; start; commence. Let's roll at sunrise.


Roll makes it easy for your project to include a Webserver (Http-kit or Aleph), Websockets (Sente), REPL (nREPL), Routing (Reitit) and File Watching (Hawk). Configure and manage them using a simple config file (Integrant).


Leiningen

roll is published on Clojars. Add the following to your project.clj's :dependencies:

[dimovich/roll "0.1.5"]

Clojure CLI/deps.edn

dimovich/roll {:mvn/version "0.1.5"}

Example

(To run this you'll need to install Clojure CLI tools.)

deps.edn

{:paths ["src"]

 :deps {dimovich/roll {:mvn/version "0.1.5"}}}

config.edn

{:roll/httpkit {:port 5000}

 :roll/handler {:routes [["/" example.server/index]]}}

src/example/server.clj

(ns example.server
  (:require [roll.core]))


(defn index [req]
  {:status 200 :body "Hello World!"})


(defn -main []
  (roll.core/init "config.edn"))

Start

clj -m example.server

The full example.

For all possible options see config.edn.

For Aleph support see this git branch.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close