Top "Koa" questions

Koa is a web framework which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.

Koa router: How to get query string params?

I'm using koa-router. How can I get the request's query string params? This is the best I managed to write: …

javascript node.js query-string koa koa-router
forEach using generators in Node.js

I'm using Koa.js framework and Mongoose.js module. Normally to get a result from MongoDB I code like this: …

node.js foreach mongoose generator koa
Display a static html file with koa.js

What I want to do is serve the index.html file when the index route (i.e. localhost:3000) is called. …

javascript node.js koa
How to parse multipart/form-data body with Koa?

Because I spent some (too much) time figuring out this simple requirement. I am documenting here the way to achieve …

javascript koa body-parser
How can I split my koa routes into separate files?

I'm trying to figure out how to split my routes into separate files. I have this so far, but it …

node.js koa koa-router
Koa.js - serving static files and REST API

I'm new to koa.js library and I need some help. I'm trying to make simple REST application using koa. …

javascript node.js rest static koa
Request Body is undefined in KOA

I have KOA Like below : var koa = require('koa'), bodyParser = require('koa-body-parser'), router = require('koa-router'), app = koa(); app.use(router(…

javascript jquery ajax node.js koa
GET request parameters with koa-router

http://localhost:3000/endpoint?id=83 results in 404 (Not Found). All other routes work as expected. Am I missing something here? router .…

node.js parameters get koa koa-router
How do I set headers to all responses in Koa.js?

In Express.js I used to have this kind of code: app.use((req, res, next) => { res.header('Access-Control-Allow-Origin', …

javascript node.js koa
Initiate file download with Koa

I'm using Koa as a webserver to serve my Polymer application. Upon pressing a button in the frontend localhost:3000/export …

node.js download koa