From 0daa2e193f97eb46f14845a3472f548bfc56af07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20J=C3=B8rgensen?= <28780271+lasjorg@users.noreply.github.com> Date: Mon, 11 Mar 2024 08:17:14 +0100 Subject: [PATCH] fix(curriculum): add information about server restart (#54035) --- .../basic-node-and-express/meet-the-node-console.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index f8a3fed2f28..1898258664f 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,6 +20,14 @@ Node is just a JavaScript environment. Like client side JavaScript, you can use We recommend to keep the terminal open while working at these challenges. By reading the output in the terminal, you can see any errors that may occur. +The server must be restarted after making changes to its files. + +You can stop the server from the terminal using `Ctrl + C` and start it using Node directly (`node mainEntryFile.js`) or using a run script in the `package.json` file with `npm run`. + +For example, the `"start": "node server.js"` script would be run from the terminal using `npm run start`. + +To implement server auto restarting on file save Node provides the `--watch` flag you can add to your start script `"start": "node --watch server.js"` or you can install an npm package like `nodemon`. We will leave this to you as an exercise. + # --instructions-- Modify the `myApp.js` file to log "Hello World" to the console.