Of course, there are many async questions and answers. But my question is about an async situation in which I need to return something.
I have this in Node Express:
app.use('/', FalcorServer.dataSourceRoute(function(req, res) {
         return new someClass('SOMEHOST', req.query.paths);
}));
Now my problem is this, someClass is async because of AJAX. (in my example I use setTimeout to make my point).
Something like this:
class someClass {
    constructor(redisHost, pathString) {
        return setTimeout(function(){
            return someModel;
        }, 1500);
    }
}
module.
    exports = someClass;
But I have to deal with this return in my app.use, how can I do this?
                        
I think you need to adjust your thinking ... app.use goes inside the callback. Without fully understanding all the full details of your issue I think this might help you.