I have an express.js
application. Users request mysite.com/something
and they receive a large amount of text. After each request I need to parse data (for example, to find something in thetext and put it into my Redis
database).
app.get('something', function (req, res) {
var data = //getting data
res.send(data);
//parsing data
});
The problem is that parsing data takes too much time and it's synchronous which means users must wait until it finishes to get their data.
Is there any way to parse data in another .js file and allow the users to get results immediately ?