// OK: await-ing a Promise before sending an HTTP response await Promise.resolve(); // WRONG: HTTP functions should send an // HTTP response instead of returning. return Promise.resolve(); // HTTP functions should signal termination by returning an HTTP response. // This should not be done until all background tasks are complete. res.send(200); res.end(); // WRONG: this may not execute since an //