vapor-docs/3.0/docs/getting-started/route-collection.md

16 lines
301 B
Markdown

# Route Collection
`RouteCollection` is a protocol that you can conform your controllers to.
They require the implementation of the `boot` function which can register routes to a router.
```swift
class LoginController: RouteCollection {
init() {}
func boot(router: Router) {
...
}
}
```