function DatabaseConnect(req, res) {...}
function CreateNewUser(req, res) {...}
function Go (app, req, res) {
// If is POST on this URL run this function
var firstFunction = app.post('/admin/svc/DB', function(res, req) {
DatabaseConnect(req, res)
});
// If is POST on this URL run this function
var secondFunction = app.post('/admin/svc/CREATE', function(res, req) {
CreateNewUser(req, res)
});
// Run first all callbacks and after render page
function Render(firstMe, afterMe) {
firstMe();
afterMe();
app.render('screen');
}
Render(firstFunction, secondFunction);
}
Go();
我怎样才能运行更多的异步功能。和 Render() 毕竟?
如果在该 URI 上进行了 POST,则调用 APP.POST。