All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala-cask.exampleApp.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
//> using scala "3.3.1"
//> using dep "com.lihaoyi::cask:0.9.2"
//> using dep "com.lihaoyi::scalatags:0.8.2"
{{>licenseInfo}}

// this file was generated from app.mustache
package {{packageName}}

{{#imports}}import {{import}}
{{/imports}}
import _root_.{{modelPackage}}.*
import _root_.{{apiPackage}}.*

/** an example of how you can add your own additional routes to your app */
object MoreRoutes extends cask.Routes {
  @cask.get("/echo")
  def more(request: cask.Request) = s"request was ${request.bodyAsString}"

  initialize()
}

/**
 * This is an example of how you might extends BaseApp for a runnable application.
 *
 * See the README.md for how to create your own app
 */
object ExampleApp extends BaseApp() {
  // override to include our additional route
  override def allRoutes = super.allRoutes ++ Option(MoreRoutes)
  start()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy