UNPKG

aztec

Version:

Node Js Framework for creating API Services

33 lines (28 loc) 514 B
import app, {testMiddleware} from '../index'; app.route({ method: 'GET', path: '/guardian-middleware', middlewares: [testMiddleware], guard: true }); app.routes('guardian-middleware-group', [ { method: 'GET', path: '/', middlewares: [testMiddleware], guard: true } ]); app.route({ method: 'GET', path: '/guardian-route', action: 'User@index', guard: true }); app.routes('guardian-group', [ { method: 'GET', path: '/', action: 'User@index', guard: true } ]);