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


i'm using koa-router.

how can request's query string params?

this best managed write:

import koarouter 'koa-router';  const router = koarouter({ prefix: '/courses' });  router.get('/', async (ctx) => {         console.log(ctx.qs["lecturer"]);     }); 

but qs undefined

any profoundly appreciated!

according docs there should ctx.request.query query string items represented object.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -