Skip to content

frwdrik/reitit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

48305a8 · Nov 1, 2017
Oct 29, 2017
Oct 30, 2017
Oct 30, 2017
Oct 29, 2017
Nov 1, 2017
Oct 29, 2017
Oct 25, 2017
Oct 29, 2017
Aug 7, 2017
Aug 7, 2017
Aug 7, 2017
Oct 31, 2017
Sep 14, 2017
Oct 25, 2017
Oct 25, 2017
Oct 30, 2017

Repository files navigation

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.

About

A fast data-driven router for Clojure/Script

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 98.3%
  • Java 1.3%
  • Other 0.4%