Skip to content

Instantly share code, notes, and snippets.

@timbaev
Created January 28, 2019 06:58
Show Gist options
  • Save timbaev/7c3c3b19184c04f9295b2f7d1e22fe22 to your computer and use it in GitHub Desktop.
Save timbaev/7c3c3b19184c04f9295b2f7d1e22fe22 to your computer and use it in GitHub Desktop.
import Vapor
/// Register your application's routes here.
public func routes(_ router: Router) throws {
// MARK: - TodoController
let todoController = TodoController(todoService: ProjectServices.todoService)
try router.register(collection: todoController)
// MARK: - UserController
let userController = UserController(userService: ProjectServices.userService)
try router.register(collection: userController)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment