,

Introduction to Express JS: Setup, First Program | Complete Node JS Tutorial in Hindi/Urdu – Part 1

Posted by

Express JS Introduction, Setup, First Program | Node JS Tutorial/Full Course in Hindi/Urdu #1

Express JS Introduction, Setup, First Program | Node JS Tutorial/Full Course in Hindi/Urdu #1

Welcome to the first lesson of our Node JS tutorial in Hindi/Urdu. In this lesson, we will cover an introduction to Express JS, how to set it up, and how to create your first program using Express JS.

What is Express JS?

Express is a web application framework for Node.js that is designed for building web applications and APIs. It provides a robust set of features for building web servers and handling requests and responses.

Setting up Express JS

To set up Express JS, you first need to have Node.js installed on your system. You can install Express JS using npm, the Node package manager. Simply run the following command in your terminal:

npm install express

This will install Express JS and its dependencies in your project directory.

Creating your First Program with Express JS

Now that you have Express JS set up, let’s create a simple web server using Express. Create a new file called app.js and add the following code:

  
  const express = require('express');
  const app = express();

  app.get('/', (req, res) => {
    res.send('Hello World!');
  });

  app.listen(3000, () => {
    console.log('Server is running on port 3000');
  });
  
  

Save the file and run it using Node.js by running the command node app.js. You should see a message in the console indicating that the server is running on port 3000. Open your web browser and navigate to http://localhost:3000 to see the message “Hello World!” displayed on the page.

Congratulations! You have just created your first program using Express JS. Stay tuned for more lessons in our Node JS tutorial in Hindi/Urdu.

0 0 votes
Article Rating
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@shawndomingo6000
5 months ago

Great Tutorial

@user-wi3lu5xy3x
5 months ago

Awesome video ❤❤

@isbrothersengineering1381
5 months ago

Thanks for this informative video ❤️

@user-ed9dn2jc5f
5 months ago

Keep it up 🎉

@TechHub-ob7qj
5 months ago

Great work!!