diff options
Diffstat (limited to 'example/variableRoutes/app/src/VariableRoutes.scala')
-rw-r--r-- | example/variableRoutes/app/src/VariableRoutes.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/example/variableRoutes/app/src/VariableRoutes.scala b/example/variableRoutes/app/src/VariableRoutes.scala new file mode 100644 index 0000000..760ab15 --- /dev/null +++ b/example/variableRoutes/app/src/VariableRoutes.scala @@ -0,0 +1,19 @@ +package app +object VariableRoutes extends cask.MainRoutes{ + @cask.get("/user/:userName") + def showUserProfile(userName: String) = { + s"User $userName" + } + + @cask.get("/post/:postId") + def showPost(postId: Int, param: Seq[String]) = { + s"Post $postId $param" + } + + @cask.get("/path", subpath = true) + def showSubpath(subPath: cask.Subpath) = { + s"Subpath ${subPath.value}" + } + + initialize() +} |