I've got a node.js-based webserver running at home and i'm trying to implement a login form.
So basically I need to access POSTed data (login/password). I found this : How do you extract POST data in Node.js? (req.on('data'...) & req.on('end'...))
But i need to do this asynchronously, can someone tell me how to do that ? (I need this code to be blocking, not non-blocking)
EDIT: All my code is available on Github : https://github.com/Fointard/NodeJs/tree/authentication The problem lies here : https://github.com/Fointard/NodeJs/blob/authentication/js/reqHandlers/auth.js Lines 98 and 104, i'm relying on 'data' and 'end' envents but i'd like to do that asychronously so that checkID() (line 95) is able to return true or false.