Last active
February 5, 2020 14:59
-
-
Save Nublo/32b0929b35ff7f67fe45e60a4ffc8be0 to your computer and use it in GitHub Desktop.
This file contains 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
fun Application.main() { | |
// DefaultHeaders adds date and server headers to each response, allowing you to expand with additional data if necessary | |
install(DefaultHeaders) | |
// CallLogging – adds logging of responses/queries | |
install(CallLogging) | |
// routing – responsible for routing queries and, in our case, uses DSL to formulate a response | |
routing { | |
get("/") { | |
call.respondHtml { | |
head { | |
title { +"Ktor on Google App Engine standard environment" } | |
} | |
body { | |
p { | |
+"Hello there! This is Ktor running on App Engine standard environment" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment