UNPKG

aztec

Version:

Node Js Framework for creating API Services

25 lines (20 loc) 507 B
import app, {testMiddleware, testMiddlewareCreate, testMiddlewareDelete} from '../index'; app.rest('/test-rest', 'Article'); app.rest('/test-rest-mid', [testMiddleware, testMiddleware, testMiddlewareCreate, testMiddleware, testMiddlewareDelete]); app.route({ method: 'GET', path: '/app1-route', action: 'User@index' }); app.route({ method: 'GET', path: '/test-route', action: 'User@index' }); app.routes('test-group', [ { method: 'GET', path: '/', action: 'User@index' } ]);