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

Add docs for context middleware #761

Closed
crandmck opened this issue Nov 6, 2014 · 6 comments
Closed

Add docs for context middleware #761

crandmck opened this issue Nov 6, 2014 · 6 comments
Assignees

Comments

@crandmck
Copy link
Contributor

crandmck commented Nov 6, 2014

I added context to docs.json and stubbed out JSdoc for it, but it needs a real docs, ie. description of what it does, better example, and explanation of all params.

Also, we need one or more examples of how to use it and "how to" documentation - see placeholder: http://docs.strongloop.com/display/LB/Using+current+context.

@pulkitsinghal
Copy link

The draft in http://docs.strongloop.com/display/LB/Using+current+context is coming along nicely.

Few points you could clarify:

  1. Does "enableHttpContext": false disable only Access the HTTP request (such as url and headers) because HTTP req/res objects are not set onto the current context ... OR does it also disable the ability to Access the currently logged-in user?
  2. Refer to this commit/gist (in a more user-friedly fashion than just providing the link I'm sharing): 7a1a3b8#diff-2

@pulkitsinghal
Copy link

@crandmck - Could you fix var accessToken = ctx.accessToken(); to be var accessToken = ctx.get('accessToken'); instead?
cc @doublemarked

@crandmck
Copy link
Contributor Author

@pulkitsinghal Thanks for updating the doc!

@doublemarked
Copy link

@crandmck Sorry if this is off-topic, but what is the best way for us to contribute to or propose changes to docs? Github Issues or something else?

@crandmck
Copy link
Contributor Author

Please read http://docs.strongloop.com/display/LB/Contributing+to+LoopBack+documentation and if you still have questions, let me know.

In general, if you see something that you know is incorrect, please just fix it!

If you want something added, please add a GitHub issue. There are already quite a few open doc issues, so it would be great if you could scan that list and see if it has already been reported.

@doublemarked
Copy link

Aha, @crandmck thanks! I had not seen this article previously. I'll stop making issues for minor doc changes and start fixing via the wiki ;)

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

No branches or pull requests

5 participants