Commit Graph

3 Commits

Author SHA1 Message Date
David Calavera 8d3467626e
Move middleware to interfaces.
This makes separating middlewares from the core api easier.
As an example, the authorization middleware is moved to
it's own package.

Initialize all static middlewares when the server is created, reducing
allocations every time a route is wrapper with the middlewares.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-04-11 09:19:27 -07:00
allencloud 2736f77a94 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-06 00:59:11 +08:00
David Calavera 1ba44a832f Make server middleware standalone functions.
Removing direct dependencies from the server configuration.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-24 14:48:52 -05:00