Routing library for Scala and Scala.js
Scala
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js/src/main/scala/trail
jvm/src/main/scala/trail
manual
project
shared/src
.gitignore
.travis.yml
README.md
build.sbt
manual.toml
version.sbt

README.md

Build Status Join the chat at https://gitter.im/sparsetech/trail Maven Central

Trail is a routing library for Scala and Scala.js.

Example

import trail._
import shapeless._

val details  = Root / "details" / Arg[Int]
val userInfo = Root / "user" / Arg[String] & Param[Boolean]("show")

val result = "/user/hello?show=false" match {
  case details (a :: HNil)            => s"details: $a"
  case userInfo(u :: HNil, s :: HNil) => s"user: $u, show: $s"
}

Links

Licence

Trail is licensed under the terms of the Apache v2.0 licence.

Authors

  • Tim Nieradzik
  • Darren Gibson
  • Anatolii Kmetiuk