aboutsummaryrefslogtreecommitdiff
path: root/server/app/controllers/HomeController.scala
diff options
context:
space:
mode:
Diffstat (limited to 'server/app/controllers/HomeController.scala')
-rw-r--r--server/app/controllers/HomeController.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/app/controllers/HomeController.scala b/server/app/controllers/HomeController.scala
new file mode 100644
index 0000000..13bc8dc
--- /dev/null
+++ b/server/app/controllers/HomeController.scala
@@ -0,0 +1,28 @@
+package controllers
+
+import play.api._
+import play.api.mvc._
+import upickle.default._
+
+/**
+ * This controller creates an `Action` to handle HTTP requests to the
+ * application's home page.
+ */
+class HomeController extends Controller {
+
+ /**
+ * Create an Action to render an HTML page.
+ *
+ * The configuration in the `routes` file means that this method
+ * will be called when the application receives a `GET` request with
+ * a path of `/`.
+ */
+ def index = Action { implicit request =>
+ Ok(views.html.index())
+ }
+
+ def message = Action { implicit request =>
+ Ok(write(chat.Message("hello")))
+ }
+
+}