[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 01/02: serving static content (test)
From: |
gnunet |
Subject: |
[libeufin] 01/02: serving static content (test) |
Date: |
Mon, 21 Jun 2021 11:22:10 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit f1b44bb9a99a26fb59926c0405956019d14aa1c3
Author: ms <ms@taler.net>
AuthorDate: Mon Jun 21 11:21:43 2021 +0200
serving static content (test)
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 5 +++++
sandbox/src/main/resources/static/hello.html | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index dc66cc2..efea041 100644
--- 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
new file mode 100644
index 0000000..9dc4299
--- /dev/null
+++ 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
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.