How to correctly open connections
Open
@chipotle is already working on this.
Since May 11, 2015.
- Dominant language
- CSS
- Stars
- 118
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
The JavaScript ten minute guide recommends doing this to open a connection:
var connection = null;
r.connect( {host: 'localhost', port: 28015}, function(err, conn) {
if (err) throw err;
connection = conn;
})
That code has a bug when not used in the REPL: the connection is open asynchronously.
It would be very helpful to have a similar example but with code that can be pasted into a script, especially for users who aren't too familiar with promises or asynchronous programming.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.