June 2025
Intermediate to advanced
837 pages
24h 50m
English
When you create applications using Node.js, the source code of that application is contained in one or more files. When launching the application, you specify the name of the initial file as an option in the command line. From this file, you then load the rest of the components of your application via the Node.js module system. The entire source code is read in and optimized by the JavaScript engine. As a consequence, changes to the source code don’t directly affect the running application. This means you need to exit and restart it for the changes to become active. Listing 3.8 shows how you can run an application with Node.js.
$ node server.mjsHello world!$
Listing 3.8 Running Node.js Applications
The server.mjs ...
Read now
Unlock full access