Skip to content

Instantly share code, notes, and snippets.

@prawnsalad
Created February 15, 2021 00:13
Show Gist options
  • Save prawnsalad/b24a8b07c0dcad7779740050326736de to your computer and use it in GitHub Desktop.
Save prawnsalad/b24a8b07c0dcad7779740050326736de to your computer and use it in GitHub Desktop.

Revisions

  1. prawnsalad created this gist Feb 15, 2021.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    const KoaRouter = require('@koa/router');

    module.exports.init = async function init(hooks, app) {
    let router = new KoaRouter({
    prefix: '/myhttp-api',
    });

    app.webserver.use(router.routes());
    };