Routineer is a Scala library that provides an internal DSL for declaring HTTP routes. Routes are constructed from strings and patterns and the type of the handling function is automatically inferred:
get("prefix" /> * /> "middle" /> (IntP >>> PositiveP[Int])) {
(req // Your request type,
str // Inferred to be a String,
i // Inferred to be an Int) =>
...
}
Routineer artifacts routineer
and routineer-scalaz
are published at
Scala-Tools.org repository with groupId
com.github.mvv.routineer
. Add the following lines to your pom.xml
if you
are using Maven:
<dependency>
<groupId>com.github.mvv.routineer</groupId>
<artifactId>routineer_YOUR-SCALA-VERSION</artifactId>
<version>0.1.2</version>
</dependency>
Or add this line to your build file if you are using Simple Build Tool:
libraryDependencies += "com.github.mvv.routineer" %% "routineer" % "0.1.2"
Install Simple Build Tool, run
$ sbt update publish-local publish-local-maven
If you plan to use Routineer with Scalaz, run
$ sbt "project routineer-scalaz" update publish-local publish-local-maven
There is no documentation at the moment, look at the example