summaryrefslogblamecommitdiff
path: root/cask/test/src/test/cask/CaskTest.scala
blob: 01c905a1d5339c88302d2ea0a2182c4817b2b06e (plain) (tree)
1
2
3
4
5
6
7
8
9

                 
                                    
                              
                                           


                     
                             

                                              

   
                              
                                      



                       

 
                                       
package test.cask

object MyServer extends cask.Routes{
  @cask.get("/user/:userName")
  def showUserProfile(userName: String) = {
    s"User $userName"
  }

  @cask.post("/post/:postId")
  def showPost(postId: Int, query: String) = {
    s"Post $postId $query"
  }

  @cask.put("/path/::subPath")
  def showSubpath(subPath: String) = {
    s"Subpath $subPath"
  }

  initialize()
}

object Main extends cask.Main(MyServer)