with node.js webstorm versions 10+, running and debugging preferably starts from the www.js file

In webstorm server is preferably created in www.js:  

var server = http.createServer(app);


Receiving post data in my app.js module, I would like to use the req.on('data', function('chunk'){}) and req.on('end', function(){}) callback structures. However, they are never running if located in app.js,
as also in http://stackoverflow.com/questions/15893005/request-not-ending-in-node-js-used-to-work

I am able to make them operational with the above described server.addListener ... structure, but only in www.js and not in app.js.
Is there an easy work around to have them in app.js or should I start adding middleware calls to www.js ?

Please sign in to leave a comment.