The vapor Router

Swift vapor3 - API and Router  Here is a blog post written in great detail, and claims that he did not write, I will not go into that part of you, your own Click to view the content on this piece of paper than to add a bit of

  1. router.grouped

Group may be added after the intermediate path and, add the path need not repeat, create a new "routers" in the variable parameters to provide the "middleware" in all following routes will be added to the package middleware

router.register (collection: <# T ## RouteCollection #>) register a set of routing, all the routes can be executed in the protocol controller RouteCollection time registration to the Router,

 

Published 39 original articles · won praise 8 · views 30000 +

Guess you like

Origin blog.csdn.net/jancywen/article/details/100016623