alp-router
    TypeScript icon, indicating that this package has built-in type declarations

    4.1.3 • Public • Published

    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));

    Keywords

    Install

    npm i alp-router

    DownloadsWeekly Downloads

    24

    Version

    4.1.3

    License

    ISC

    Unpacked Size

    51.3 kB

    Total Files

    32

    Last publish

    Collaborators

    • churpeau