Top "Koa2" questions

For questions related to the second generation of the Koa web framework for Node.

Nodejs - how group and export multiple functions in a separate file?

How can I group and export multiple functions in nodejs? I am trying to group all my util functions in …

javascript node.js express ecmascript-6 koa2
Koa2 - How to write to response stream?

Using Koa2 and I'm not sure how to write data to the response stream, so in Express it would be …

javascript node.js stream koa2
How to redirect some URL conditionally in the koa 2

This is what i'm thinking, pseudo code. const myRedirect = (routePath) => { newUrl = routePath; if (matches condition) newUrl = do_some_modification(…

koa koa2
How to get koa-router query params?

I haved used axios.delete() to excute delete in frontend ,code like below Axios({ method: 'DELETE', url:'http://localhost:3001/delete', …

node.js koa2
Typeorm connect to multiple database

I use node.js , TS and typeorm for back-end project. I need to connect to a different database in the …

node.js postgresql typescript typeorm koa2
Adding properties to Koa2's context in Typescript

I want to use Facebook's DataLoader with Koa2 in Typescript. I want per-request DataLoader instances to go with my per-request …

typescript koa2