Wizard: add simple js template

This commit is contained in:
Ilya Kirillov
2019-12-17 15:26:18 +03:00
parent 5d56f3d28b
commit b29e6d0c69
10 changed files with 175 additions and 58 deletions
@@ -5,6 +5,9 @@ import io.ktor.routing.get
import io.ktor.routing.routing
import io.ktor.server.engine.embeddedServer
import ${serverEngine.getImport()}
#foreach($import in $imports)
import $import
#end
import kotlinx.html.*
fun HTML.index() {
@@ -15,6 +18,9 @@ fun HTML.index() {
div {
+"Hello from Ktor"
}
#foreach($element in $elements)
$element
#end
}
}
@@ -24,6 +30,9 @@ fun main() {
get("/") {
call.respondHtml(HttpStatusCode.OK, HTML::index)
}
#foreach($route in $routes)
$route
#end
}
}.start(wait = true)
}