Scala DSL for declaring HTTP routes
Scala
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples/servlet
notes
project
scalaz/src
src
tests
.gitignore
LICENSE
README.markdown

README.markdown

Routineer

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) =>
  ...
}

Installation

Automatic

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"

From source

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

Usage

There is no documentation at the moment, look at the example