Created
October 23, 2019 13:41
-
-
Save digimon1740/573918aa952591b90cb05fc4e4cf5fb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//before handlers | |
app.before(ctx -> { | |
// 모든 요청의 앞단에서 동작합니다. | |
}); | |
app.before("/path/*", ctx -> { | |
// /path/* 로 시작하는 모든 요청의 앞단에서 동작합니다. | |
}); | |
//endpoint handlers | |
app.get("/", ctx -> { | |
// 구현 로직 | |
ctx.json(object); | |
}); | |
app.get("/hello/*", ctx -> { | |
// hello/* 의 하위 경로에 대한 모든 요청을 받습니다. | |
}); | |
//after handlers | |
app.after(ctx -> { | |
// 모든 요청의 뒷단에서 동작합니다. | |
}); | |
app.after("/path/*", ctx -> { | |
// /path/* 로 시작하는 모든 요청의 뒷단에서 동작합니다. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment