blob: 3f079d901e002bd6793fe4ee040d45a3655e7042 [file] [log] [blame]
package express
import express.auth.isAuthenticated
//import express.auth.isAuthenticated
fun routes(app: dynamic) {
app.get("/") { req, res ->
if(!isAuthenticated("bob")) {
res.send(401, "you sir, are not authorized !")
} else {
res.type("text/plain")
res.send("hello world")
}
}
}