Answer the question
In order to leave comments, you need to log in
Are there any rules for building the architecture of a node.js application? For example, is it correct to pass a reponse object in a callback function?
For example:
app.post('/authorize',function(req, res){
pg_queries.authorize(res);
});
pg_queries.authorize = function (response) {
if (...) {
res.send(session-key); //используем переданный объект
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question