Created
October 20, 2017 14:46
-
-
Save stfalconaleks/e98e36b140b86425dfc42a06f8de68de to your computer and use it in GitHub Desktop.
This file contains 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
import Vapor | |
let drop = Droplet() | |
drop.get("hello") { request in | |
if let name = request.data["name"]?.string { | |
return try drop.view.make("hello", ["name": name]) | |
} | |
return try drop.view.make("hello", ["name": "no name"]) | |
} | |
drop.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment