Skip to content

Instantly share code, notes, and snippets.

@fitomad

fitomad/vapor4_intro.swift Secret

Created Apr 27, 2020
Embed
What would you like to do?
// 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
You can’t perform that action at this time.