-
-
Save fitomad/325709cd94657e19f30e2e76b66543f9 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
// Directorio raiz del sitio web | |
app.get { req in | |
... | |
} | |
// Se corresponde con el recurso /rooms | |
app.get("rooms") { req -> String in | |
... | |
} | |
// Es el recurso /rooms/:name | |
// :name es una variable que recoge lo que haya | |
// escrito el usuario en su lugar, como por ejemplo | |
// /rooms/vapos | |
// /rooms/swift | |
app.get("rooms", ":name") { req -> String in | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment