Last active
August 16, 2018 12:26
-
-
Save libchaos/1e9f905d656df2a18e7a14edfe6cf4f9 to your computer and use it in GitHub Desktop.
node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/dog/age/:age', (req, res) => { | |
redis.lrange('dog:age:' + req.params.age) | |
.then((data) => Promise.all(data.map(redis.hgetall))) | |
.then((data) => res.send(data)); | |
console.timeEnd('request'); | |
}) | |
app.get('/dog/age/:age', (req, res) => { | |
redis.lrange('dog:age:'+req.params.age) | |
.then((data)=> { | |
Promise.all(data.map(redis.hgetall)) | |
console.log('done') //this destroy the programm how can I find the reason | |
//seems only in oneline that can run. | |
}) | |
.then((data) => res.send(data)) | |
console.timeEnd('request') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment