-
Notifications
You must be signed in to change notification settings - Fork 22
Rework README, add info from docs site #18
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
Conversation
Thanks for asking me to take a look.
Mind the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you are running on a Node version supported by this module!
We should state what these are, rather than leaving it up to the user to figure it out for themselves. Either state the versions or say that it's the Node versions supported by LoopBack.
Otherwise, LGTM.
@crandmck my concern is that the supported versions are maintained in loopback-context may support a smaller set of Node versions than LoopBack does. Thoughts? |
``` | ||
|
||
This keeps you from using Node < v4.5. | ||
If you are using a process manager like `pm2` or `strong-pm`, then consult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe recommend strong-pm
first?
{ | ||
"initial": { | ||
"loopback-context#per-request": {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
},
invoked multiple times on the same request and returns immediately in | ||
subsequent runs.** | ||
|
||
Here’s sample code which uses a middleware function to place the currently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a snippet using a middleware..
The following is an example of using a middleware...
IMO, it is better to be clear than to leave the docs ambiguous (I agree with @crandmck on this point, we should favour the end user experience over our laziness to maintain the docs). I agree with you though they will get outdated over time, but we can simply update it when a user complains/creates an issue at that time. An alternative solution is maybe link directly to the line in package.json from the README? |
Perhaps some combo of the two, i.e. state the specific Node versions in the README, and say something like "if you encounter problems, check |
Or, since Loopback docs are now open source, and are supposed to be quite up-to-date, list the versions there, and in the README you can just remind the user to read the docs. |
@josieusa hey, thank you for chiming in! Since loopback-context is deprecated, the docs on loopback.io will no longer mention this module. That's one of the reasons why I am moving the content from loopback.io to this README.
If the user is using an unsupported Node.js versions, My conclusion is that I am going to list the current supported versions in README, nothing more. |
Rework the initial section, simplify warnings and installation instructions. Update the "Usage" section with content from docs site, as was found in [Using-current-context.md](http://bit.ly/2hNJSBN).
Rework the initial section, simplify warnings and installation
instructions.
I decided to remove the "engine-strict" recommendation, as Node v0.10/v0.12 are no longer supported under the LTS plan, therefore I think it's unlikely there will be people running on these ancient versions and wanting to use the new loopback-context.
Update the "Usage" section with content from docs site, as was found in
Using-current-context.md.
@crandmck @josieusa PTAL
cc @superkhau