You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I peeked in the middleware.js file and see that it's been made to comply with express. I tweaked my own version and is working. Just want you to know this!
working for koa (lasso/middleware/serveStatic.js):
// line 44
return function(ctx, next) {
var req = ctx.request,
res = ctx.response;
In koa ctx is passed instead of express' req and res.
The text was updated successfully, but these errors were encountered:
module.js:471
throw err;
^
Error: Cannot find module 'lasso/middleware/koa'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/karl/dev/node/sketch/experiment/koa-babel-lasso/src/index.js:7:1)
at Module._compile (module.js:570:32)
at loader (/home/karl/dev/node/sketch/experiment/koa-babel-lasso/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/karl/dev/node/sketch/experiment/koa-babel-lasso/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
I've fully fixed this now, tested on both koa and koa@2. Here is the pull request.
https://github.com/koajs/koa
I peeked in the middleware.js file and see that it's been made to comply with express. I tweaked my own version and is working. Just want you to know this!
working for koa (lasso/middleware/serveStatic.js):
In koa ctx is passed instead of express' req and res.
The text was updated successfully, but these errors were encountered: