159-angular-universal-cloud-functions icon indicating copy to clipboard operation
159-angular-universal-cloud-functions copied to clipboard

Easy to miss "export const app …" step due to focus on commenting out `app.listen(…)`

Open fredsa opened this issue 6 years ago • 1 comments

Thanks for the great tutorial

Quick suggestion is to split this step:

Make sure to export the express app, then remove the call to listen.

into two separate steps, as it's easy to miss when looking at the the code snippet below where it looks like the only thing needing to change is commenting out of the app.listen(…) call.

fredsa avatar Feb 21 '19 05:02 fredsa

If you prefer to leave this as one step, then suggest highlighting the addition of the export keyword using a comment, so something like this:

// 👇 Add the `export` keyword here.
export const app = express();

// ...

// 👇 Remove or comment out these lines.

// Start up the Node server
// app.listen(PORT, () => {
//   console.log(`Node Express server listening on http://localhost:${PORT}`);
// })
//

fredsa avatar Feb 21 '19 05:02 fredsa