Skip to content

lgastako/vasco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vasco

I am not afraid of the darkness. Real death is preferable to a life without living.

A simple cljx routing library.

Usage

From Clojure:

(ns your.clj.app
  (:require [vasco.core :refer [defendpoint])))

From ClojureScript:

(ns your.cljs.app
  (:require [vasco.core :refer-macros [defendpoint])))

Then (from either Clojure or ClojureScript), you can define endpoints:

(defendpoint home    "/")
(defendpoint users   "/users")
(defendpoint profile "/profile/:username")

And render the url template with the parameters filled in:

(home-path)
;; "/"

(profile-path :username "john")
;; "/profile/john"

Right now there is absolutely no special treatment of the params.

License

Copyright © 2014 John Evans

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

simple cljx routing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published