| author | cu |
| Wed, 18 Oct 2017 22:31:20 +0100 | |
| changeset 553 | 9fe160a13539 |
| parent 198 | 2ce98ee39990 |
| permissions | -rw-r--r-- |
| 13 | 1 |
package controllers |
2 |
||
3 |
import play.api.mvc._ |
|
4 |
||
5 |
// hello world program |
|
6 |
// just answers the GET request with a string |
|
7 |
||
8 |
object Application extends Controller {
|
|
9 |
||
10 |
// answering a GET request |
|
11 |
val index = Action { request =>
|
|
12 |
||
13 |
Ok("Hello world!")
|
|
14 |
} |
|
15 |
||
16 |
} |
|
17 |
||
18 |
/* |
|
19 |
* HTML can be returned using |
|
20 |
* |
|
21 |
* OK("<H1>Hello world!</H1>").as(HTML)
|
|
22 |
* |
|
23 |
*/ |