scala的Web框架:Finatra
jopen
10年前
Finatra是一个受sinatra启发的scala Web框架,运行在Finagle之上。
特性:
- Fully Async using Futures
- Mustache Templates
- Detailed Metrics (p99,p999, etc)
- Profile/Debug over HTTP
- SSL/TLS 支持
- Deploys with a single jar
class HelloWorld extends Controller { get("/hello/:name") { request => val name = request.routeParams.get("name").getOrElse("default user") render.plain("hello " + name).toFuture } } object App extends FinatraServer { register(new HelloWorld()) }