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

#4: Serve HTML CSS & JS Files in Express JS | Middleware in Express JS in Hindi in 2020

Поделиться
HTML-код
  • Опубликовано: 2 окт 2020
  • 😍 Check my Instagram to Chat with me: / vinodthapa55
    ✅ NodeJS Tutorial in Hindi 2020: • NodeJS Tutorial in Hin...
    ✅ Express JS Tutorial In Hindi in 2020: • Express JS Tutorial In...
    ************ Must Watch Videos For Web Development ************
    ➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: • React JS Tutorial in H...
    ➡️ React JS Project Netflix App Part #1 in Hindi in 2020: • #22: Props in React Js...
    ➡️ Install VS Code for ReactJS LINK: www.thapatechn...
    😍😍 Check Programming Videos in One Hour👇
    ➡️ Complete Reactjs in One video here • ReactJS For Beginners ...
    ➡️ HTML in One Video: • Learn HTML in One Vide...
    ➡️ CSS in One video: • Learn Complete CSS In ...
    ➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
    ➡️ JavaScript in One video: • JavaScript in One Vide...
    ➡️ ECMAScript 6 in One Video: • ES5 & ES6 | ECMAScript...
    ➡️ HTML5 in one video: • HTML5 Tutorial in One ...
    ➡️ CSS3 in one video: • Learn Complete CSS3 In...
    ➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
    ➡️ Jquery in One video: • jQuery in One Video in...
    ➡️ JSON in one video: • JSON in One Video in H...
    ➡️ ReactJS in one video: • ReactJS For Beginners ...
    ➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
    ➡️ NodeJS in one video: / ipnwakoibt
    ➡️ MySQL in one video: • Complete SQL & MySQL i...
    ********** CLICK HERE TO WATCH ************
    ➡️ Fetch API in JavaScript: • Fetch API in JavaScrip...
    ➡️ AJAX tutorial for beginners in Hindi: • AJAX tutorial for begi...
    ➡️ Template literals (Template strings) in ES6 in JavaScript in Hindi: • ES6 Tutorial #3: Templ...
    ➡️ Async Await in JavaScript in Hindi: • Async Await in JavaScr...
    ➡️ Promises in JavaScript in Hindi: • Master The Promises in...
    ➡️ Callback Hell in JavaScript: • Callback Hell in JavaS...
    ➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
    ➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
    ➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
    ➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
    ➡️ Source Code Link: www.thapatechn...
    ➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
    ➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
    ➡️Plz show some love to My Siter RUclips Channel and Plz Subscribe Link: / @mayabeautyvlogs878
    **************** MUST WATCH VIDEOS *****************
    ➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
    ➡️ How To Become a Web Developer 2020: • How To Become a Web De...
    ➡️ How JavaScript Works: • How JavaScript Works i...
    ➡️ Follow me on Instagram: / vinodthapa55
    Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
    ➡️ Link: • Make Website Responsiv...
    Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
    Don't Forget to Follow me on all Social Network,
    Website Link: www.thapatechn...
    Instagram Link: / vinodthapa55
    Facebook Link: / vinodthapa55
    Twitter Link: / vb55thapa
    Facebook ThapaTechnical Page Link: www.facebook.c...

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

  • @ThapaTechnical
    @ThapaTechnical  3 года назад +28

    Hope you all love it❤️ be with my channel always 🙏

    • @ezone2726
      @ezone2726 3 года назад

      I m following you and learning node js express js.
      Thank you so much Sir.
      Do teach us more things in node js and express js.

    • @JamesBond-mc7kl
      @JamesBond-mc7kl 3 года назад

      Laravel me crud operation par video banao pls

    • @fsociety692
      @fsociety692 3 года назад

      you can simply create file by using touch index.html instead of type nul > index.html
      touch basicaly mac and linux command but you can use in window as well

    • @otisbraxton4653
      @otisbraxton4653 3 года назад

      i guess I am pretty randomly asking but does anyone know of a good website to watch new movies online?

    • @landrydominic412
      @landrydominic412 3 года назад

      @Otis Braxton Meh I use flixportal. You can find it thru google:P -landry

  • @rahul-java-dev
    @rahul-java-dev 3 года назад +23

    Helpful but little bit confusing. What about '/' request ? What if we want html pages for every other request like "/about", "/service" etc !!

    • @rahul-java-dev
      @rahul-java-dev 3 года назад +6

      Bhai log... Next videos me sb theek ho gya hain... Aage videos follow kre plz.

    • @jyotikamat1787
      @jyotikamat1787 2 года назад +1

      @@rahul-java-dev thanks

    • @FP_MH
      @FP_MH 2 года назад

      @@jyotikamat1787 welcome

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

      Hello bhai job lag gai kya

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

    the syntax is not properly explained. to me what was confusing the most was why did the app.use() served files direcly into the homepage even though after that we clearly mention in app.get("/ "........................................), which comes after the app.use and thus it should override the app.use, however the full syntax and right practice for using static is always mentioning the path, so the proper syntax would be ,
    app.use(" / ", express.static(path.join(__dirname, 'public')))
    we can use this multiple times to mention whatever we want to serve at whatever path in our static website . i still dont understand why app.get() didnt override the app.use( ) but i guess i will just remember it for now.

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

      App.use is called first, n that's it..
      If u put app.get before then check what happnd..

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

      Yes true if we call app.get first for the / route the it gets executed and if app.use is executed before app.get then whatever it's serving gets rendered.... By default the app.use(express.static()) serves to the / route but we can explicitly specify it by writing as app.use('/about',express.static())

  • @entitleop5206
    @entitleop5206 Год назад +5

    To be honest , you did a better explainatiok of this course than code with harry❤

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

      Hlo can u help me plz ..mere static file pta ni kyu load ni hori server p

  • @EngineerAbbas12
    @EngineerAbbas12 Год назад +2

    for those (__dirname, '../public') is not working, try to writing (__dirname, 'public ') instead this...

  • @deepikakapoor9607
    @deepikakapoor9607 3 года назад +10

    Thank you so much ❤️

  • @urvishjaiswal5271
    @urvishjaiswal5271 2 года назад +3

    Thanks Vinod bhai for explaining us the complex concepts in easy manner🌼🙏

  • @shivampatel8850
    @shivampatel8850 2 года назад +2

    A person who I like After Code With Harry is you as Programming and coding teacher

  • @nirjhariniparhi
    @nirjhariniparhi 3 года назад +1

    Genuinely ur all videos are fav

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

    My god, my mind blow away!!! You are genious teacher brother, I really appreciate :)

  • @arindam1249
    @arindam1249 2 года назад +3

    very simple yet effective explanation!

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

    for those (__dirname, '../public') is not working try writing (__dirname, 'public ') instead

  • @shriRadhaVallabhjuu
    @shriRadhaVallabhjuu 2 года назад +1

    Thank u so much sir, u are great, doing good job

  • @15jitu
    @15jitu 2 года назад +1

    Thankyou Thapa Sir.

  • @suvodhdhungyell2268
    @suvodhdhungyell2268 3 года назад

    Dai tapai last babal manxe ho yar.... I love you ... Best teacher ever keep it on ....

  • @TrainerCheese
    @TrainerCheese 2 года назад +2

    how do i serve static files based on the request url?? Please answer this question with the code

  • @04.nehalsingh12
    @04.nehalsingh12 2 года назад +1

    awesome tutorial sir

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

    Vinod bhai is the best

  • @shakilbabu7368
    @shakilbabu7368 3 года назад

    Thank you sir, I got lots of pain to serve HTML,CSS,JS,IMG etc together . But, finally solved for sake you. take love.

  • @anuragupadhyay319
    @anuragupadhyay319 3 года назад +1

    what a great explaination sir , you really made it so simple

  • @lekhasri1194
    @lekhasri1194 3 года назад

    I am been literally dying for this video . u made this easy thank u so muchhhh

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

    Your all videos are awesome thapa sir💞💞💞💞

  • @krishankumar8720
    @krishankumar8720 2 года назад +3

    boom guys😅😅😅😅

  • @ezone2726
    @ezone2726 3 года назад +2

    Please also teach us login create account and forgot password using node js express js

  • @iloveindia7912
    @iloveindia7912 3 года назад +4

    Sir DBMS ke liye kaun sa database programming language best hai
    Please reply

  • @marutidesai1788
    @marutidesai1788 3 года назад

    Thanks thapa bhai thats what i was searching for . Thx

  • @codebengali925
    @codebengali925 2 года назад +2

    ReferenceError: __dirname is not defined in ES module scope
    please use
    const __dirname = path.resolve();
    console.log(__dirname);

    • @siddhaysawant9188
      @siddhaysawant9188 2 года назад +1

      Bhai apko pahile aapko
      const path = require('path'); //yeh aisa likhna padega
      //then uske baad
      console.log(__dirname);
      //ye karoeg toh sucess hoga

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

    One like for your explaination😊

  • @Shatakshigoenka
    @Shatakshigoenka 3 года назад +1

    Thanks sir I really needed it.

  • @anshulsingh1265
    @anshulsingh1265 2 года назад +1

    i'm not able to load Javascript...help me someone

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

    thanks sir you clear all my doubts.
    👍

  • @ratul1125
    @ratul1125 3 года назад

    I love you so much Thapa sir. You are the best. May you live long 😍💖💖💗💞

  • @ankitkataria5454
    @ankitkataria5454 3 года назад +1

    Those who are having problem with getting the html page, check if the path you've provided is correct. Print the __dirname path and then change it accordingly

    • @ayushmathur154
      @ayushmathur154 3 года назад

      I am getting the same error

    • @meghnaperuri5096
      @meghnaperuri5096 3 года назад +1

      @@ayushmathur154 the pathname in the google might be localhost:8000/aboutUs. change it to localhost:8000

    • @TheKumarAshwin
      @TheKumarAshwin 2 года назад +1

      or use __filename instead

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

      Thanks a lot, you saved me

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

      Can u help me plz mere public folder k ander Jo files h html aur css ki wo laod ni ho pari sab kuch sahi likhne pr bhi

  • @djayrok91
    @djayrok91 2 года назад +2

    Sir my html file not displaying plz help

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

    Boom guys 😂, love it

  • @user-qg3yx3ls1v
    @user-qg3yx3ls1v 11 месяцев назад

    In my computer static file is not appear in my browser in this way. I need to write html file name after port number in address bar in my web browser. I have a Ubuntu system. Please help me @ThapaTechnical

  • @sayanboks8425
    @sayanboks8425 3 года назад

    thank you sir for this playlist, its vary helpful.

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

    for those who are getting error= __dirname is not defined in ES module scope..... use --const __dirname = path.resolve();

  • @siddhaysawant9188
    @siddhaysawant9188 2 года назад

    thankyou again thapa technical :)

  • @syednabeelali9038
    @syednabeelali9038 3 года назад

    if we want to dynamic website in express so what shoul we do?
    aur ap ne stic website se routes ka nai batya

  • @ankitkushwah4373
    @ankitkushwah4373 3 года назад +1

    Thanks for you awesome👍

  • @srirammm1
    @srirammm1 3 года назад

    thanks for this vdo lots of love

  • @ARSHADKHAN-hc6pb
    @ARSHADKHAN-hc6pb 3 года назад +1

    Bhai daynamic website project banu ge kiya?

  • @artisticprogrammer364
    @artisticprogrammer364 3 года назад

    Love you sir. You are awesome.

  • @abdheshkumar7699
    @abdheshkumar7699 2 года назад

    kya aisa hum client or server folder ke sath bhi krskte hai kya jese client folder alg hai usme client site ki files eg html,css,jqeury then server folder main mujhko nodejs database krna hai toh aisa krr skte hai

  • @dhainik.suthar
    @dhainik.suthar 3 года назад +3

    bro yahi html page hame
    /about
    pe show karavana ho to kese ??

    • @kashifahmed_1995
      @kashifahmed_1995 3 года назад +3

      app.use("/about", express.static(__dirname + "/public"));
      Ab tak to aap ne figure out kar hi liya hoga but maine dekha to reply kar diya.
      Agar ham endpoint na den to by default '/' me hi request jaegi.

    • @keshav6097
      @keshav6097 2 года назад

      @@kashifahmed_1995 tumhara iss prog ka output aya tha?? Hellppppp🥺

    • @kashifahmed_1995
      @kashifahmed_1995 2 года назад

      @@keshav6097 Main subah reply krta hoon.
      Kafi din ho gye dekhna padega

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

    Sir y should we pass only "folder name" inside "express.static()" instead of " folder name/file name "

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

    you helped a lot bro

  • @kamalCode
    @kamalCode 3 года назад +2

    Top 10 Udemy course for freelancer web MERN AND LARAVEL

  • @soumikdey1456
    @soumikdey1456 3 года назад +5

    Boom guys 🤣🤣🤣

  • @Codehunting
    @Codehunting 3 года назад

    Hi bro , what if we want to show this static html file to other route like about us ?

  • @rajuraj1257
    @rajuraj1257 3 года назад

    nice video. Thanks

  • @ravikumardabhade8677
    @ravikumardabhade8677 3 года назад

    Hello Sir suppose mere more than 2 js file ye mysql database ke aur use muje main file app.js mein call karna ye tho Kaise karu please help me

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

    Why in the last app.get not run in browser?

  • @hanshal1602
    @hanshal1602 3 года назад

    this video is helpful

  • @ShivamKendre-fc3su
    @ShivamKendre-fc3su 3 года назад

    Video is awesome

  • @anaskhalilkhalilahmed3586
    @anaskhalilkhalilahmed3586 3 года назад

    please make a separate video on middleware's that is very important

  • @shubhashishbhattacharya7917
    @shubhashishbhattacharya7917 3 года назад +1

    Hi @Thapa , I followed the same process. Still I am not able to serve my html page.

    • @jasveensinghkohli7053
      @jasveensinghkohli7053 3 года назад

      Same here . If u got what to do then please tell me

    • @pawanjaiswal6059
      @pawanjaiswal6059 3 года назад

      this method only serves index.html to your "/" path of ur server

    • @ButWhyIn2
      @ButWhyIn2 2 года назад

      @@pawanjaiswal6059 Thanks a lot bhai :))

  • @yashdeore473
    @yashdeore473 3 года назад +1

    brilliant

  • @akshatrajput521
    @akshatrajput521 2 года назад

    Express.static function is not working. Plz Help!

  • @bhushanambhore8378
    @bhushanambhore8378 2 года назад

    Thanks

  • @akashsirsat1269
    @akashsirsat1269 22 дня назад

    And how to it connected with mongodb 🤔

  • @shivanigoswami2773
    @shivanigoswami2773 3 года назад

    Pls make videos on complete project using nodejs

  • @mdiftakherhossain8524
    @mdiftakherhossain8524 3 года назад

    I have a problem in this video. Please help me.

  • @AbhishekGupta-zf8tj
    @AbhishekGupta-zf8tj 3 года назад +1

    why you did'nt add that line(app.use() ) in the below routing blocks .....
    and if there are more than 1 html pages or more static components in public folder then wht to do...?????

    • @prodoshcmitter1120
      @prodoshcmitter1120 3 года назад

      This is my question also.. what to do then if there are multiple files??

  • @sudhansusingh1122
    @sudhansusingh1122 2 года назад +1

    nhi bhai awesome nhi hai, multiple pages k liye bhi bta diya hota, aadha bta ke confuse mt kiya kro, bikul AWESOME nhi lga mujhe

  • @mr.optimist4945
    @mr.optimist4945 3 года назад +1

    Watched many youtube videos, but this one made my day .Thankyou bro ❣from Nepal. Can i get your cell no brother.

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

    Why my path is not supporting

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

    Its not working....

  • @himanshugagare2559
    @himanshugagare2559 3 года назад +1

    Sir please make a video on music player version3 with new options please sir

  • @darktaib
    @darktaib 20 часов назад

    Boom guys😂😂😂

  • @amir4ever148
    @amir4ever148 2 года назад

    bhai did the same but i am not able to server the page

  • @hannanafridi1649
    @hannanafridi1649 3 года назад

    Awesome

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

    Css file is not working. What to do

  • @syednabeelali9038
    @syednabeelali9038 3 года назад

    dynamic website bana saktey hen ?

  • @fayaz4645
    @fayaz4645 2 года назад

    Bhaiya express session ke upar en video banao na please ....

  • @jasveensinghkohli7053
    @jasveensinghkohli7053 3 года назад

    Bro i have followed all the steps correctly but it is not showing the html page instead of that it is showing what was written on res.send. please help 🙏🙏🙏

    • @thecosmetrohub2737
      @thecosmetrohub2737 3 года назад

      don't copy path from the console instead of it try to initialize it with a variable, it worked for me

    • @atharvayadav9766
      @atharvayadav9766 2 года назад

      @@thecosmetrohub2737 tried but still not able to do it

  • @digvijayyamagekar4300
    @digvijayyamagekar4300 3 года назад

    how did you served html file

  • @user-vg7ue7ms1t
    @user-vg7ue7ms1t 29 дней назад

    Liken ager hame wo about page per Lana hai tu kaise karr😢

  • @sunilkumaroffficial
    @sunilkumaroffficial 2 года назад

    amazing

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

    Why we use app.use();

  • @JamesBond-mc7kl
    @JamesBond-mc7kl 3 года назад

    Laravel me crud operation par video banao pls

  • @rohandubey1722
    @rohandubey1722 3 года назад

    OSSSSSSSSSSSSumm Sir .....

  • @poorvishukla2962
    @poorvishukla2962 3 года назад

    Nice

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

    you told us get,post,delte,put but u didnt told us about 'app.use()'

  • @deepakrajak7555
    @deepakrajak7555 3 года назад

    sir ji jaldi aage ka video upload kijye

  • @DeepakGupta-hj2dv
    @DeepakGupta-hj2dv 3 года назад

    Socket io pr video bna do

  • @jugalsharma6114
    @jugalsharma6114 3 года назад

    Mongo db course plz plz

  • @ritikadhangar2979
    @ritikadhangar2979 3 года назад

    Mere img show nahi ho rahi🤔🤔

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

    Please avoid " Boom Guys "

  • @amir4ever148
    @amir4ever148 2 года назад

    12:49 TypeError: root path required this error is showing

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

    please make proper video ablout path.join i have tried alot of effort but not able to show html file on the browser

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

      same here

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

      @@akhilshukla8901 but now I have find the solution you don't have to give exact path in path.join just give css folder name and cssfilename.css we have already define via public folder.

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

      okk

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

      thank u

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

      @@deepakgadwal008 bhai isse doen to ho gaya lekin design abhi bhi nhi aay hai

  • @umairhashmi9532
    @umairhashmi9532 3 года назад +1

    Code:Module not found error samjha den thapa bhai issi video mai appear hua tha

  • @pravatmete5653
    @pravatmete5653 3 года назад

    First view

  • @vedantx-b2986
    @vedantx-b2986 3 года назад

    I don't know why but mera nahi chala kevl app.send me jo likha tha vahi aaraha ha website nahi aarahi public ke andr index.html vale can anyone help me 😟😟

    • @reyazmra
      @reyazmra 2 года назад

      Same here
      You know why??????

    • @harshsinghal8527
      @harshsinghal8527 2 года назад

      @@reyazmra same here please give the solution

    • @reyazmra
      @reyazmra 2 года назад

      @@harshsinghal8527 reyaz-mra GitHub Id and check blogshut repo
      May be you get..

  • @hanutsai6860
    @hanutsai6860 3 года назад

    first

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

    8:10

  • @mikashmir2699
    @mikashmir2699 3 года назад

    video is not clear, it is very dim

  • @shivam_poddar
    @shivam_poddar 3 года назад +1

    source code kaha hai sala source code kaha h

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

    ye Intro kitna meetha h ;(