Answer the question
In order to leave comments, you need to log in
NODE.js and Express: how to bind an async call to receive a POST request. functions and executing res.end() only on an event?
Good afternoon,
there is node.js with express. You need to do the following
app.post("/", function(){
AsyncFoo();
myEventEmitter.on("AsyncFoo done", function(){
res.end();
});
})
Answer the question
In order to leave comments, you need to log in
Duck pass a callback to AsyncFoo and call res.end there, why are there events?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question