Robert Jaros
singePageApplication()
index.html
routing { get("/index.html") { call.respondText( "<html><head><title>Custom index.html</title></head><body></body></html>", ContentType.Text.Html ) } singlePageApplication { defaultPage = "index.html" filesPath = "/assets" useResources = true } }
/assets/index.html
/index.html
Aleksei Tirman [JB]
routing { get("/index.html") { call.respondText("Hello, world!", ContentType.Text.Plain) } singlePageApplication { defaultPage = "NOT_EXISTING_RESOURCE" filesPath = "/assets" useResources = true } route("/") { route("{static-content-path-parameter...}") { // !!! Important name copied from Ktor sources get { call.respondText("Hello, world!", ContentType.Text.Plain) } } } }
A modern programming language that makes developers happier.