Это видео недоступно.
Сожалеем об этом.

Building HTTP Server in NodeJS

Поделиться
HTML-код
  • Опубликовано: 9 янв 2023
  • Hey Everyone, In this video, we will create our own HTTP web server using NodeJS and HTTP built-in module in NodeJS
    ► Complete Full Stack Web Developer RoadMap 2023: • Complete Full Stack We...
    ► Master NodeJS Playlist: • Master NodeJS
    Quick Links
    Node.JS Website: nodejs.org/en/
    Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run JavaScript on the server side, creating server-side applications with JavaScript.
    ► My Website: www.piyushgarg.dev
    My Gears
    ► My Girlfriend: amzn.to/3WD6FRp
    ► Apple MacBook Laptop: amzn.to/3WBJgQn
    ► Anker USB Hub: amzn.to/3GhZSr0
    ► Blue Yeti Microphone: amzn.to/3YKZ9FT
    ► External 27” Monitor: amzn.to/3Vp3xaO
    ► Logitech MK295 Wireless Keyboard and Mouse: amzn.to/3DuL1bB
    ► Seagate Expansion 1TB External HDD: amzn.to/3QMm5Q8
    ► Tripod: amzn.to/3S4OwK4
    ► Ring Light: amzn.to/3YLf8DR
    Disclaimer: All the links above are affiliate links.
    Social Links
    ► Twitter - / piyushgarg_dev
    ► LinkedIn - / piyushgarg195
    Video Titles
    What is NodeJS?
    HTTP Server NodeJS
    Creating Web Server in NodeJS
    HTTP Module in NodeJS
    NodeJS Tutorial in Hindi
    Tags
    #nodejs #javascript #developer #server #javascriptinhindi #webdevelopment #webapp #realtimeapp #serverside #nonblockingio #tech

Комментарии • 87

  • @HyperSonicSam
    @HyperSonicSam 3 месяца назад +7

    Wow. This has helped me so much. It is my first day starting Node.JS, and looking at the code level, I could never imagine learning this anywhere else. This feels easy now. Thank you Piyush!

  • @swapnilmohanty4045
    @swapnilmohanty4045 2 месяца назад +1

    I have been looking for tutorials for setting up http server and this video is mind-blowing. It's so easy and helpful. Best one for starting this topic in my opinion, Hats off Piyush Sir.

  • @ganeshghode5595
    @ganeshghode5595 6 месяцев назад +5

    Mind blowing #Node.js series On the RUclips ❤❤❤❤❤❤❤

  • @shinzo007
    @shinzo007 4 месяца назад +2

    Bro this is the best video on the http web server. Best content 👍🏻

  • @rudraprataprao5823
    @rudraprataprao5823 25 дней назад

    Excellent Video Piyush Bhai :)
    Thanks a LOT.

  • @nandjijayaswal3077
    @nandjijayaswal3077 9 месяцев назад +2

    Excellent teaching style and well explained ! Thanks Sir .

  • @kartikking7
    @kartikking7 Год назад +11

    One of the most underrated channel

  • @tanmaychhabra8721
    @tanmaychhabra8721 21 день назад

    @Piyush Garg Totally love the way you teach and explain the concepts. Please keep up this good work as it will help so many like me to understand the concepts clearly ❤.

  • @user-yy8lh4kb6f
    @user-yy8lh4kb6f 5 месяцев назад

    Bestest palylist ever .. Thanks allot for sharing your amazing knowledge with us

  • @zainabasifali1995
    @zainabasifali1995 18 дней назад

    Best explanation ever had.

  • @dpxy1599
    @dpxy1599 9 месяцев назад +25

    Bhai tu hi job dilaega mujhe toh

  • @techy912
    @techy912 22 часа назад

    Bhaiya Love your content 😍😍

  • @AnmolThakur-vv9lf
    @AnmolThakur-vv9lf 7 месяцев назад

    Understood everything very grateful for this amazing content.

  • @letstry2854
    @letstry2854 5 месяцев назад

    Thanks sir jee, I really enjoyed and learnt via your videos!!

  • @ankit0225
    @ankit0225 Месяц назад

    00:02 Creating an HTTP web server using NodeJS
    02:07 Creating HTTP server using NodeJS.
    04:11 Handling requests and sending responses in NodeJS
    06:09 Setting up a callback function for starting the server
    08:05 Headers provide extra information about the request.
    10:09 Building HTTP Server in NodeJS
    12:19 Creating a log for web server requests
    14:25 Creating multiple pages using switch case on request URL.
    16:29 Always support non-blocking requests for better performance
    Crafted by Merlin AI.

  • @shamshad3971
    @shamshad3971 Год назад +1

    Excellent teaching! Thanks alot!

  • @ArunaTeacher-fr5uz
    @ArunaTeacher-fr5uz 5 месяцев назад +1

    Easy explanation 🎉

  • @divyarajsinhrana6045
    @divyarajsinhrana6045 11 дней назад +1

    Any database operation is blocking or non-blocking request ?

  • @user-qg7eq9eb1i
    @user-qg7eq9eb1i 6 месяцев назад

    Yes in req. header we can find out the ip of user , x-forwarded is method to findout the ip

  • @souravkumar961
    @souravkumar961 3 месяца назад

    Thank you so much for the excellent explanation

  • @lekhanh9085
    @lekhanh9085 25 дней назад

    Great tutorial ! Can you tell me what is the Theme used in VS Code in the video?

  • @mma-dost
    @mma-dost Год назад +3

    sir can we have a one video first and then you can upload daily videos of that . Then same for express and mongo db and then a project video with mern good project you explain like no other 🙏🙏

  • @yadvendra84
    @yadvendra84 2 месяца назад

    Very informative videos good tutorials

  • @sen-surajit
    @sen-surajit 2 месяца назад

    Excellent bro 👍❤

  • @jagdishchoudhary7944
    @jagdishchoudhary7944 8 месяцев назад +1

    after watching this my brain started connecting the dot how nextjs work under the hood

  • @simranbanwait
    @simranbanwait 9 месяцев назад

    great explanation, Thanks bhai

  • @jatilyadav4000
    @jatilyadav4000 Год назад +1

    Amazing video

  • @user-ql7pw7ld1n
    @user-ql7pw7ld1n 2 месяца назад

    fantastic thank you so much :)

  • @deeppanchal9567
    @deeppanchal9567 Год назад

    Very Well Explained Sir 🔥

  • @spdwivedi5925
    @spdwivedi5925 4 месяца назад

    Sahi video banate ho bhaiya aap to

  • @pankajdubey1123
    @pankajdubey1123 3 месяца назад

    Thanks sirg for this content

  • @AnshuKushwaha-xz8di
    @AnshuKushwaha-xz8di 5 дней назад

    piyush bhaiya bahut jyada hard work krna padega lg rha hai

  • @pratappadhy2005
    @pratappadhy2005 3 месяца назад

    Thanks Piyush. What code completion extension you are using?

  • @satyamjha-codeindwala6666
    @satyamjha-codeindwala6666 5 месяцев назад

    g #Node.js series On the RUclips ❤❤❤❤❤❤❤

  • @not_amanullah
    @not_amanullah 4 месяца назад

    this is helpful ❤

  • @tusharyadav4856
    @tusharyadav4856 8 месяцев назад

    @15:35 if I go to homepage and then to any other, its showing "this site can't be reached" (P.S. I writing '/' also)

  • @mohsinabbassayyed9610
    @mohsinabbassayyed9610 Год назад

    I am facing that issue, even server is running at post in terminal but in browser its telling that local host refused to connect though my firewall is off

  • @sandip5507
    @sandip5507 8 месяцев назад

    @Piyush Garg which theme are you using in vs code i really liked it can you tell?

  • @pkyadav6230
    @pkyadav6230 9 месяцев назад

    excellent sir.😍🤑..but we need more detailed or advance things than this if possible and if ppt could be there using which we can visual the things ....

  • @poolman7786
    @poolman7786 11 месяцев назад +1

    which is most prefer able client side rendering or server side rendering

    • @nachatra-sharm0
      @nachatra-sharm0 7 месяцев назад

      Nowadays mostly we are using is client side rendering for ex reactjs based frontend are best example for client side rendering

  • @chandrakantkamble3371
    @chandrakantkamble3371 Год назад

    Best video ❤

  • @pankilchoudhary1648
    @pankilchoudhary1648 5 месяцев назад

    sir server tho express ke throw bhi bna sakte hai na ???
    please clearify my douth

  • @nipunjain1142
    @nipunjain1142 6 месяцев назад

    Please koi Nodejs ka open source project suggest kriye.. agar saath mai angular bhi ho to best rahega

  • @aanchalpani198
    @aanchalpani198 Месяц назад

    Hi piyush when i m doing the log file why the date is not showing me there in log file can uh just tell me please

  • @ShivendraPratap524
    @ShivendraPratap524 Год назад +3

    Done
    Sir before starting express, can there be a project video only using nodejs..

  • @dishagurjar9419
    @dishagurjar9419 6 месяцев назад +1

    Server create krne ke bad terminal pr object nhi aa rha

  • @payalkatoch4377
    @payalkatoch4377 7 месяцев назад

    ❤❤great

  • @user-zf7hq4yk4c
    @user-zf7hq4yk4c 5 месяцев назад

    sir i have one doubt those auto suggestion like fs.appendFile is not coming can you give some suggestion how to do it on my vs code PL!ZZ
    !

  • @technologygadget6570
    @technologygadget6570 11 месяцев назад

    Kadak lecture

  • @_dimey_
    @_dimey_ Год назад +1

    sir,
    i started my serer but i am not able to see anything on localhost:8000 and i set the port to 8000 also server starts but doesn't work further

    • @piyushgargdev
      @piyushgargdev  Год назад

      Ah, Whats the issue?

    • @mohsinabbassayyed9610
      @mohsinabbassayyed9610 Год назад

      @@piyushgargdev even I am facing that issue, even server is running at post in terminal but in browser its telling that local host refused to connect though my firewall is off

    • @user-en2dr9pn3e
      @user-en2dr9pn3e 6 месяцев назад

      i think u must kill the existing terminal by simply clicking on the option kill terminal , and start a new one so that its gets refreshed and u might get the output!

  • @not_amanullah
    @not_amanullah 4 месяца назад

    thanks ❤

  • @VikasSharma-kc2oc
    @VikasSharma-kc2oc Год назад

    Awesome

  • @SulavGhimireeee
    @SulavGhimireeee 7 месяцев назад

    Thanks bro

  • @sukhmanjeetsingh452
    @sukhmanjeetsingh452 Год назад

    sir apne jo video me smjyea or is code (given below me kya difference hai)
    const express = require('express')
    const app = express()
    const port = 3000
    app.get('/', (req, res) => {
    res.send('Hello World!')
    })
    app.listen(port, () => {
    console.log(`Example app listening on port ${port}`)
    })

    • @linustorvalds1549
      @linustorvalds1549 Год назад +1

      video pe node built in http method use hua hai to create server, aur is code pe express use hua hai to create server

    • @sukhmanjeetsingh452
      @sukhmanjeetsingh452 Год назад

      @@linustorvalds1549 thankx

  • @shivamchaturvedi4183
    @shivamchaturvedi4183 2 месяца назад

    Bhai ye fav icon wala kse htega

  • @vishalvishwakarma5728
    @vishalvishwakarma5728 Год назад +1

    Sir if I'm not wrong can we install nodemon package. If we start the server using nodemon
    Then we don't need to run the server again and again if we are making any changes in code

  • @updateshub1462
    @updateshub1462 10 месяцев назад

    nice

  • @Manishsharma-xt5ri
    @Manishsharma-xt5ri 23 дня назад

    Prabhu Ji local host nhi chal rha chrome mein

  • @amankumar3639
    @amankumar3639 5 месяцев назад

    👍👍👍👍👍👍

  • @ArunaTeacher-fr5uz
    @ArunaTeacher-fr5uz 5 месяцев назад

    🎉🎉🎉

  • @dheeraj5624
    @dheeraj5624 Год назад

    Local Host not working in browser

  • @simplsurvival
    @simplsurvival 4 дня назад

    I am getting error at line no.5 at 12:06 anybody can help?

    • @varunchavda7292
      @varunchavda7292 8 часов назад

      Used backticks ( ` ) instead of single quotes ( ' )
      On the left side of 1 in keyboard

    • @knightcore4062
      @knightcore4062 2 минуты назад

      also can search template literals from mdn docs

  • @AnkitKumar-pk8tk
    @AnkitKumar-pk8tk 5 месяцев назад

  • @vishwakarma-ex1sm
    @vishwakarma-ex1sm 3 месяца назад

    day-2

  • @mohd1612yusuf
    @mohd1612yusuf 3 месяца назад

    sab to theek hai lekin aapko is code ka link description me dena chahiye tha

  • @bunnytheweebster
    @bunnytheweebster 7 месяцев назад

    vid-7 ✅

  • @Monu55757
    @Monu55757 5 месяцев назад

    Great Work

  • @sktshahid
    @sktshahid Год назад +1

    const log = '${Date.now()}: New Request Came
    '; date is not added in txt file. Instead saveing like '${Date.now()}: New Request Came . Plz let me know the error if any from my side .
    Thanks

    • @csfahad
      @csfahad Год назад

      Use backtics (`) instead of the string (') , it's just above the tab key

  • @harshkumargupta_07
    @harshkumargupta_07 Год назад +1

    Whoever are getting error try this
    const http = require("http");
    const fs = require("fs");
    const myServer = http.createServer((req, res) => {
    const log = `${Date.now()}: ${req.url} Request received
    `;
    fs.appendFile("./text.txt", log,(err) => {
    if(err) throw err;
    switch(req.url){
    case '/':
    res.end("Hello from HomePage");
    break;
    case '/about':
    res.end("Hello from about");
    break;
    default:
    res.end("404 error found");
    }
    });
    });
    myServer.listen(8000, () => {
    console.log("Server Started");
    });

    • @gumlaa
      @gumlaa 9 месяцев назад

      //try this one
      const http = require('http');
      const fs = require('fs');
      const myServer = http.createServer((req, res) => {
      const log = `${Date.now()}: ${req.url} New Request Received
      `;
      fs.appendFile('log.txt', log, (err) => {
      if (err) {
      console.error(err);
      res.end("Error processing request");
      } else {
      // console.log(req); // Log the request object
      // res.end("Request logged"); // Respond to the request
      switch (req.url) {
      case '/':
      res.end("This is homepage");
      break;
      case '/about':
      res.end("My name is flower");
      break;
      default:
      res.end("404 : Page not found");
      break;
      }
      }
      });
      });
      myServer.listen(3000, () => {
      console.log('Server is running on port 3000');
      });

  • @adinarayanareddy3226
    @adinarayanareddy3226 Год назад

    nice