Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/foo', function(req, res) {
- db.getSubscribers().then(function(fres) {
- return Promise.cast(fres).map(function(item) {
- return portCheck.checkOpen(item.username).then(function(state) {
- return { username: item.username, state: state };
- });
- }).then(function(arr) {
- res.render('foo.ejs', { subscribers: arr });
- })
- });
- });
- app.get('/foo', function(req, res) {
- db.getSubscribers().map(function(item) {
- return portCheck.checkOpen(item.username).then(function(state) {
- return { username: item.username, state: state };
- });
- }).then(function(arr) {
- res.render('foo.ejs', { subscribers: arr });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement