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

    5.1.1 • 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(new URL('./config', import.meta.url))(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

    8

    Version

    5.1.1

    License

    ISC

    Unpacked Size

    27.5 kB

    Total Files

    18

    Last publish

    Collaborators

    • churpeau