169
rated 0 times
[
171]
[
2]
/ answers: 1 / hits: 74230
/ 7 Years ago, thu, april 6, 2017, 12:00:00
I'm using koa-router.
How can I get the request's query string params?
This is the best I managed to write:
import koaRouter from 'koa-router';
const router = koaRouter({ prefix: '/courses' });
router.get('/', async (ctx) => {
console.log(ctx.qs[lecturer]);
});
but qs
is undefined
Any help will be profoundly appreciated!
More From » node.js