-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
my code is simple:
const nodeMonkey = require('node-monkey');
const Koa = require('koa');
nodeMonkey();
const app = new Koa();
app.use((ctx) => {
let url = ctx.request.url;
ctx.body = url;
console.log(ctx);
});
app.listen(3000);
i want to log 'ctx' in chrome.
but i got this problem:
RangeError: Maximum call stack size exceeded
at ServerResponse.get (_http_outgoing.js:114:16)
at ServerResponse.getHeaders (/Users/cyw/Desktop/learnByself/koa2-gitbook-node/node_modules/restify/lib/response.js:177:17)
at ServerResponse.get (_http_outgoing.js:115:17)
at ServerResponse.getHeaders (/Users/cyw/Desktop/learnByself/koa2-gitbook-node/node_modules/restify/lib/response.js:177:17)
at ServerResponse.get (_http_outgoing.js:115:17)
at ServerResponse.getHeaders (/Users/cyw/Desktop/learnByself/koa2-gitbook-node/node_modules/restify/lib/response.js:177:17)
at ServerResponse.get (_http_outgoing.js:115:17)
at ServerResponse.getHeaders (/Users/cyw/Desktop/learnByself/koa2-gitbook-node/node_modules/restify/lib/response.js:177:17)
at ServerResponse.get (_http_outgoing.js:115:17)
at ServerResponse.getHeaders (/Users/cyw/Desktop/learnByself/koa2-gitbook-node/node_modules/restify/lib/response.js:177:17)
there is no recursive call in my code, how this happen?