https://github.com/dimovich/roll
Roll — backend for Clojure
https://github.com/dimovich/roll
aleph backend clojure http-kit integrant nrepl reitit reloaded-workflow sente tools-deps
Last synced: 2 months ago
JSON representation
Roll — backend for Clojure
- Host: GitHub
- URL: https://github.com/dimovich/roll
- Owner: dimovich
- License: mit
- Created: 2018-02-16T08:46:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T09:03:58.000Z (over 1 year ago)
- Last Synced: 2025-10-22T01:57:03.422Z (2 months ago)
- Topics: aleph, backend, clojure, http-kit, integrant, nrepl, reitit, reloaded-workflow, sente, tools-deps
- Language: Clojure
- Homepage:
- Size: 396 KB
- Stars: 78
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Roll framework
> 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](http://www.http-kit.org/) or [Aleph](https://aleph.io/)), ___Websockets___ ([Sente](https://github.com/ptaoussanis/sente)), ___REPL___ ([nREPL](https://github.com/clojure-emacs/cider-nrepl)), ___Routing___ ([Reitit](https://github.com/metosin/reitit)), ___Task Scheduling___ ([Chime](https://github.com/jarohen/chime)), ___File Watching___ ([Hawk](https://github.com/wkf/hawk)) and ___Logging___ ([Timbre](https://github.com/ptaoussanis/timbre)). Configure and manage them using a simple config file ([Integrant](https://github.com/weavejester/integrant)).
## Leiningen
`roll` is published on [Clojars](https://clojars.org/dimovich/roll).
Add the following to your `project.clj`'s `:dependencies`:
[dimovich/roll "0.3.337"]
## Clojure CLI/deps.edn
dimovich/roll {:mvn/version "0.3.337"}
## Example
(To run this you'll need to install [Clojure CLI tools](https://clojure.org/guides/getting_started).)
__deps.edn__
``` clojure
{:paths ["src"]
:deps {dimovich/roll {:mvn/version "0.3.337"}}}
```
__config.edn__
```clojure
{:roll/httpkit {:port 5000}
:roll/handler {:routes [["/" example.server/index]]}}
```
__src/example/server.clj__
``` clojure
(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
```
Navigate to [localhost:5000](http://localhost:5000).
## Example Projects
[Basic](/example) and [Descryptors](https://github.com/descryptors/descryptors).
For all possible options see [config.edn](/config.edn).
For Aleph support see [this git branch](https://github.com/dimovich/roll/tree/aleph).