Koa-router: How to get-query-string params?

Ich bin mit koa-router.

Wie bekomme ich den request-query-string params?

Dies ist die beste, die ich geschafft zu schreiben:

import koaRouter from 'koa-router';

const router = koaRouter({ prefix: '/courses' });

router.get('/', async (ctx) => {
        console.log(ctx.qs["lecturer"]);
    });

aber qs undefined

Jede Hilfe wird zutiefst geschätzt!

InformationsquelleAutor Alon | 2017-04-06
Schreibe einen Kommentar