Stats

 Latest version : 2.0.1

 Last updated on 2019-03-08T17:58:02.639Z

 Keywords : alp, router

 Downloads :

  • 277 in Last Month

 Links :

 Examples

¯\_(ツ)_/¯
No examples found for this package

 Readme

alp-router

router for alp

router-segments

This package works with router-segments.

Install

yarn add alp-router router-segments
npm install --save alp-router router-segments

With Koa

import Koa from 'koa';
import config from 'alp-node-config';
import language from 'alp-node-language';
import router from 'alp-router';
import createRouter from './createRouter';

const app = new Koa();
// init
config(__dirname + '/config')(app);
language(app);

// handlers
app.use(router(createRouter())(app));

With Alp (Node or Browser)

import Alp from 'alp';
import router from 'alp-router';
import createRouter from './createRouter';

const app = new Alp();

// handlers
app.use(router(createRouter())(app));

 Comments