Skip to content
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

question - route handler signature #110

Open
nichoth opened this issue Dec 4, 2017 · 1 comment
Open

question - route handler signature #110

nichoth opened this issue Dec 4, 2017 · 1 comment

Comments

@nichoth
Copy link

nichoth commented Dec 4, 2017

Hi, it is unclear to me what the done function is here. Maybe I missed it… I can't find it in the documentation.

https://github.com/shipharbor/merry#handler--appstart

function handleRoute (req, res, ctx, done) {
  done(null, 'hello planet')
}

Thanks. I like your API a lot in this project.

@lrlna
Copy link
Member

lrlna commented Dec 12, 2017

ooooo! thanks for this! this is a bug in documentation and is what's left over from a previous version of the API. This should read:

function handleRoute (req, res, ctx) {
  ctx.send(200, { message: 'hello planet' })
}

or something of the sort. e.g. there is no more done and you'd just send with ctx.send or res.end().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants