aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt')
-rw-r--r--src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt b/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt
new file mode 100644
index 0000000..ac6e745
--- /dev/null
+++ b/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt
@@ -0,0 +1,29 @@
+package io.jamesbarnett.redditlite.controller
+
+import org.springframework.stereotype.Controller
+import org.springframework.web.bind.annotation.GetMapping
+import org.springframework.web.bind.annotation.ResponseBody
+import org.springframework.web.servlet.ModelAndView
+
+@Controller
+class MiscController {
+ @GetMapping("/")
+ fun renderLandingPage() : ModelAndView {
+ return ModelAndView("landing")
+ }
+
+ @GetMapping("/healthcheck")
+ @ResponseBody
+ fun healthCheck() : String {
+ return "ok"
+ }
+
+ @GetMapping("/robots.txt")
+ @ResponseBody
+ fun robotsTxt() : String {
+ return """User-agent: *
+Disallow: /
+"""
+ }
+
+} \ No newline at end of file