libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit f1b44bb9a99a26fb59926c0405956019d14aa1c3
parent 48d6d1c6acc572387159780ed585d63b3dd5da69
Author: ms <ms@taler.net>
Date:   Mon, 21 Jun 2021 11:21:43 +0200

serving static content (test)

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 5+++++
Asandbox/src/main/resources/static/hello.html | 11+++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -66,6 +66,7 @@ import com.github.ajalt.clikt.parameters.types.int import execThrowableOrTerminate import io.ktor.application.ApplicationCall import io.ktor.http.* +import io.ktor.http.content.* import io.ktor.request.* import io.ktor.util.date.* import tech.libeufin.sandbox.BankAccountTransactionsTable.accountServicerReference @@ -289,6 +290,10 @@ fun serverMain(dbName: String, port: Int) { } } routing { + static("/static") { + resources("static") + } + get("/") { call.respondText("Hello, this is Sandbox\n", ContentType.Text.Plain) } diff --git a/sandbox/src/main/resources/static/hello.html b/sandbox/src/main/resources/static/hello.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Hello</title> +</head> +<body> +Testing the static folder. +</body> +</html> +\ No newline at end of file