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.

How to check for error when using yield instead of node-style callback?

I'm wrapping my head around the new ecma6 generators and yield-operator in javascript, specifically in the context of koa. Consider …

javascript asynchronous generator koa
How to use socket.io together with webpack-hot-middleware?

I have a Koa server using webpack-dev-middleware and webpack-hot-middleware doing hot module replacement (HMR), so the middleware uses a websocket …

node.js express socket.io webpack koa
Koa@2 error handling

I'm building an API with Koa. I have all my routes in place with koa-router. Each route uses a controller …

javascript error-handling koa
Troubles with koa-cors and Access-Control-Allow-Credentials

I have this error XMLHttpRequest cannot load http://127.0.0.1:1337/. Response to preflight request doesn't pass access control check: The value of …

javascript jquery cors koa
using koa and passport for authenication

I'm using koa and passport trying to implement middleware to prevent access to URIs when not authenticated. var koa = require(…

authentication routing passport.js koa
Add SSL to Node.js Koa Server?

I'd like to encrypt my Koa server with SSL. It seems simple enough with a regular httpServer, but I'm not …

node.js https koa
How do I mock my config file for testing?

I have a Koa app I just started and I need to test something that grabs data from a config …

javascript node.js unit-testing tdd koa
Cookie not being set in browser

I am trying to set a cookie which has my auth token in it. I can see it being returned …

javascript node.js reactjs cookies koa
Using express middleware in koa

I have existing code which implements an express middleware. How can I use this middleware in a Koa application? When …

node.js express koa