더북(TheBook)
fun main() {
    val app: HttpHandler = routes(
        "/todo/{user}/{list}" bind Method.GET to ::showList 
    )
    app.asServer(Jetty(8080)).start()
}
fun showList(req: Request): Response {     
    val user: String? = req.path("user")   
    val list: String? = req.path("list")
    val htmlPage = """
<html>
    <body>
        <h1>Zettai</h1>
        <p>Here is the list <b>$list</b> of user <b>$user</b></p>
    </body>
</html>""" 
   return Response(OK).body(htmlPage) 
}       
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.