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

minor documentation issue, push only servers #525

Open
odradek71 opened this issue Aug 18, 2020 · 2 comments
Open

minor documentation issue, push only servers #525

odradek71 opened this issue Aug 18, 2020 · 2 comments

Comments

@odradek71
Copy link

The documentation page describing push-only servers has a code example with
server.addExtension({ ... });

but I believe 'server' refers to the bayeux server here, where in the other documentation pages the variable 'server' refers to the http server.
var server = http.createServer()

just for clarity, might be helpful to use the same variable names as the other pages.

@odradek71
Copy link
Author

also for the push-only server example code, I had to change message.ext to message.data.ext

      var password = message.data.ext && message.data.ext.password;
      if (password !== secret)

@odradek71
Copy link
Author

also for the push-only server example code, I had to change message.ext to message.data.ext

var password = message.data.ext && message.data.ext.password;
if (password !== secret)

I dug a bit further and have to admit this was my misunderstanding of how the password should be added. When I was trying to add the password via the client.publish() arguments it was showing as a property under the message.data hierarchy. But now I've figured out the right way to add the secret is via child.addExtension(), and that way it can be added to message.ext

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

1 participant