Created
January 5, 2018 13:54
-
-
Save arnaudgiuliani/5d3c7f1ac80aef926ba2242d7faad2ad to your computer and use it in GitHub Desktop.
Start Spark with a controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A simple Spark controller | |
| class HelloController { | |
| init { | |
| get("/hello") { | |
| "Hello !" | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(vararg args: String) { | |
| // Start Spark | |
| startSpark { | |
| // run HelloController | |
| HelloController() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment