Tagged Questions
2
votes
0answers
50 views
Node.js promises: save results? [closed]
I'm new to Promises and I don't know the best practises. The following code retrieves page history then search history. I want this history to be saved in variables in order to use it later. I wrote ...
1
vote
1answer
124 views
Is this a reasonable way to implement promises in node.js?
I'm using passport to setup login in an express site. The site is just a playground for me to learn. The code inside login was exhibiting the arrow anti pattern so I decided it was time to learn to ...
2
votes
1answer
57 views
What is the best approach to cache/memoize Promise results?
One approach it to chain cachedPromise and "regular", thus, if cachedPromise fails, we call a regular one (and caching results).
...
7
votes
2answers
167 views
Nodejs broker between mongodb and rabbitmq
I wrote a small program that aims to take some data from the mongodb database and put them in the rabbitmq queue.
I tried to use only promise style but I am a beginner in javascript.
Could you please ...
2
votes
1answer
62 views
Cleaning up nested promises in Cloud function
I am writing the Cloud function for Parse whose purpose is to update my database with a provided array of data objects. The main problem are the nested promises, which doesn't look right. Any help ...
0
votes
1answer
58 views
Promises and chained calls
I've realized JS callback hell and I started looking into Promises libraries.
After reading some articles I decided to start with BluebirdJS. I didn't realise how to properly use them yet, because ...
2
votes
1answer
77 views
Thoughts on this conversion of code from Step.js to Q promise library?
I have some code that I'd written using this pattern with Step.js. In this case, talking to MongoDB in Node:
...
2
votes
1answer
203 views
Limiting Q promise concurrency in JavaScript
I wrote a helper to limit Q promise concurrency.
If I have a promise-returning function promiseSomething, writing
...
0
votes
0answers
52 views
My yld NPM - callbacks/promises alternative
I'd like feedback on my callbacks/promises alternative, please.
The yld repository
...