url-match-feng
v0.0.4
Published
url match middleware of koa
Readme
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)
