-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Maximum call stack size exceeded #46
Comments
That is definitely strange. I will have to try and reproduce it in a few hours (after I get a little sleep). Whatever it is, it shouldn't be too difficult to sort out. |
Hey, sorry I wasn't able to get back to you yesterday. The issue here is some sort of bad interaction with Restify. I will have to look into it this weekend. The good news is, Node Monkey has a feature that allows you to provide your own server as documented here. Since I don't have a Koa example there yet, here is some code based on yours that will work: const NodeMonkey = require('node-monkey')
const Koa = require('koa')
const mount = require('koa-mount')
const send = require('koa-send')
const app = new Koa()
const monk = NodeMonkey({
server: {
server: app.listen(3000)
}
})
const monkPaths = monk.getServerPaths()
app.use(mount('/monkey.js', async ctx => await send(ctx, monkPaths.client, { root: monkPaths.basePath })))
app.use(mount('/monkey', async ctx => await send(ctx, monkPaths.index, { root: monkPaths.basePath })))
app.use(async (ctx, next) => {
await next()
let url = ctx.request.url
ctx.body = url
console.log(ctx)
}) Note that you'll have to install |
thanks for your advice, i'll try to understand what you told me about |
my code is simple:
i want to log 'ctx' in chrome.
but i got this problem:
there is no recursive call in my code, how this happen?
The text was updated successfully, but these errors were encountered: