A fast data-driven routing library for Clojure/Script
Find a file
Tommi Reiman 1ccd93101c Perf page
2017-11-01 09:28:28 +02:00
.circleci Oh, we have circeci too 2017-10-29 09:31:28 +02:00
doc Perf page 2017-11-01 09:28:28 +02:00
modules Replace the version in place 2017-10-30 21:39:35 +02:00
perf-test/clj/reitit Perf page 2017-11-01 09:28:28 +02:00
scripts Update also markdown docs with latest version 2017-11-01 09:24:11 +02:00
test Re-package & re-module 2017-10-29 09:31:28 +02:00
.gitignore Add karma packages 2017-10-25 17:32:12 +03:00
.travis.yml Try to fix .travis conf 2017-10-29 09:31:28 +02:00
book.json Explicitly use the highlight plugin for gitbook 2017-09-14 17:39:26 +03:00
CHANGELOG.md Initial commit 2017-08-07 14:15:45 +03:00
CONTRIBUTING.md Initial commit 2017-08-07 14:15:45 +03:00
LICENSE Initial commit 2017-08-07 14:15:45 +03:00
package-lock.json Add karma packages 2017-10-25 17:32:12 +03:00
package.json Add karma packages 2017-10-25 17:32:12 +03:00
project.clj Replace the version in place 2017-10-30 21:39:35 +02:00
README.md Update README.md 2017-10-31 10:28:48 +02:00

reitit Build Status

A friendly data-driven router for Clojure(Script).

See Issues for roadmap.

Latest version

Clojars Project

Quick start

(require '[reitit.core :as r])

(def router
  (r/router
    [["/api/ping" ::ping]
     ["/api/orders/:id" ::order]]))

(r/match-by-path router "/api/ping")
; #Match{:template "/api/ping"
;        :meta {:name ::ping}
;        :result nil
;        :params {}
;        :path "/api/ping"}

(r/match-by-name router ::order {:id 2})
; #Match{:template "/api/orders/:id",
;        :meta {:name ::order},
;        :result nil,
;        :params {:id 2},
;        :path "/api/orders/2"}

Documentation

Check out the full documentation!

Special thanks

To all Clojure(Script) routing libs out there, expecially to Ataraxy, Bide, Bidi, Compojure and Pedestal.

Also to Compojure-api, Kekkonen and Ring-swagger and for the data-driven syntax, coercion & stuff.

And some Yada too.

Development instructions

The documentation is built with gitbook. To preview your changes locally:

npm install -g gitbook-cli
gitbook install
gitbook serve

To bump up version:

# new version
./scripts/set-version "1.0.0"
./scripts/lein-modules install

# works
lein test

# deploy to clojars
./scripts/lein-modules do clean, deploy clojars

License

Copyright © 2017 Metosin Oy

Distributed under the Eclipse Public License, the same as Clojure.