0.0.4 • Published 6 years ago
url-match-feng v0.0.4
Introduction
url match middleware of koa
Usage
npm install --save url-match-feng
const app=require('koa')();
const match=require('url-match-feng');
const routesconfig={
'/index': { method: 'GET', cache: 300, main: 'index', type: 'html' },
'/channel': { method: 'GET', cache: 200, main: 'channel', type: 'html' },
};
app.use(match({routesConfig}));
app.listen(3000);
options
routesConfig
object,the info of routes(can not be null)