Your First Node.js Application

📘 Node.js 👁 43 views 📅 Nov 05, 2025
⏱ Estimated reading time: 1 min

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
Register Now

Share this Post


← Back to Tutorials

Popular Competitive Exam Quizzes