Your First Node.js Application

Node.js 128 views Nov 05, 2025 1 min read

Node.js allows you to run JavaScript code outside the browser. Creating a simple application helps understand how Node.js works.


Step 1: Create a JavaScript File

Create a new file named app.js.


Step 2: Write Your Code

console.log("Hello, Node.js!");

Step 3: Run the Application

Open the terminal in the project folder and run:

node app.js

Output

Hello, Node.js!

Explanation

  • console.log() prints output to the terminal

  • node app.js executes the JavaScript file using Node.js


Conclusion

This simple application demonstrates how Node.js executes JavaScript code on the server. It is the foundation for building more complex Node.js applications.

Some advanced sections are available for Registered Members
Share this Post
🚀 Want to Test Your Knowledge?

Take quizzes related to this topic and see where you stand!

Start Quiz Now
Back to Tutorials