casualjim
4/14/2011 - 6:56 PM

dsl proposal for embedded servers

dsl proposal for embedded servers

object Main {
  def main(args: Array[String]) {

    WebServer("src/main/webapp", Config.webServerPort) { server =>
      server.inContext("/api") { context => 
        context.mount("validate", new ValidateApp)
        context.mount("channels", new MessageChannelApp)
        
        context.mount("streams", new StreamsApp)
        context.mount("", new AccountApp)
      }
      server.mount("plans", new PlanApp)  //mounts in root context
    }

  }
}