Skip to content

About

Boolean Tech Academy - Exercise 42/50: Node Hello World. A first introduction to Node.js, exploring how to initialize a project, execute JavaScript files from the terminal and automate script execution with npm.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge

Exercise 42/50: Node Hello World

A first introduction to Node.js, exploring how to initialize a project, execute JavaScript files from the terminal and automate script execution with npm.

Project overview

Repository Project Category Main Focus Exercise
node-hello-world Node Hello World Exercise Node.js, npm scripts 42/50

Assignment

Create your first Node.js application and learn how to run JavaScript files outside the browser.

Milestone 1: Initialize the project

Create a new Node.js project and initialize it.

npm init

Milestone 2: Create the server

Create a server.js file that prints the following message in the terminal:

Hello World

Run the file directly from the terminal using basic Node.js commands.

Milestone 3: Configure the start script

Add a start script to package.json to execute the application.

npm run start

Milestone 4: Configure watch mode

Add a watch script to package.json that automatically restarts the application whenever the source file changes.

Run the script.

npm run watch

Modify the code so that it prints:

Hello Boolean

The terminal should display the updated message automatically, without manually stopping and restarting the application.

Bonus challenge

Experiment with process.argv, the array containing the command-line arguments passed to the Node.js process. Explore how to access and use these arguments within your application.

Technologies

JavaScript Node.js npm

What I learned

  • Initializing a Node.js project with npm.
  • Executing JavaScript files using Node.js.
  • Configuring scripts in package.json.
  • Running application scripts with npm.
  • Automating application restarts with watch mode.
  • Exploring command-line arguments with process.argv.

Credits

Exercise assigned by Boolean Tech Academy as part of the Web Development course (Class 152, A.Y. 2025-2026).

About

Boolean Tech Academy - Exercise 42/50: Node Hello World. A first introduction to Node.js, exploring how to initialize a project, execute JavaScript files from the terminal and automate script execution with npm.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages