#6: Template Engines (Pug, hbs, EJS) in Node JS 😍 | Add Dynamic Content in Express JS in Hindi

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 324

  • @ThapaTechnical
    @ThapaTechnical  4 ปีที่แล้ว +10

    Today, video is very important bcz we will see how to add dynamic content to our applications using Template Engines in Express 😍Check my Instagram to Contact me: instagram.com/vinodthapa55
    ✅ NodeJS Tutorial in Hindi 2020: th-cam.com/play/PLwGdqUZWnOp00IbeN0OtL9dmnasipZ9x8.html
    ✅ Express JS Tutorial In Hindi in 2020: th-cam.com/play/PLwGdqUZWnOp3Vqww2cL5KbDkShj4NMRzk.html

    • @cricketroutine4336
      @cricketroutine4336 4 ปีที่แล้ว

      Bro ma nepal bata. I want full tutorial on news portal website... please...... please. ... Take it as a request from your subscriber

    • @Pallavi_B
      @Pallavi_B 4 ปีที่แล้ว

      How to pass html data from one file to another without form post method ?

    • @cricketroutine4336
      @cricketroutine4336 4 ปีที่แล้ว

      @@Pallavi_B use Get method

    • @fsociety692
      @fsociety692 3 ปีที่แล้ว +1

      bro after moving html stuff in hbs code works but css not working any solution

  • @harshkumar-mm6pq
    @harshkumar-mm6pq 2 ปีที่แล้ว +2

    full of energy man ...i purchase the course from coding ninjas but they were not explaining all the thing

  • @mohammadsahil4347
    @mohammadsahil4347 2 ปีที่แล้ว +58

    Keep your views folder inside the src folder if you're getting an error, saying Failed to lookup view "index" in views directory

  • @joyguha7944
    @joyguha7944 3 ปีที่แล้ว +1

    best channel in youtube for MEARN stack dev

  • @anishnair7348
    @anishnair7348 3 ปีที่แล้ว +48

    const staticPath=path.join(__dirname,"../views");
    app.set('views',staticPath);
    Add these two if some getting error.

  • @visitor_t-w3p
    @visitor_t-w3p 6 หลายเดือนก่อน

    Wooow.simply majestic...loved it a lot ..getting so much fun,thank u so much Thapa ji :D

  • @mohitgupta1109
    @mohitgupta1109 3 ปีที่แล้ว +1

    Hii, Thapa sir your videos are really awesome you are my Role Model, I watched each and every video of you.

  • @shubhamk840
    @shubhamk840 3 ปีที่แล้ว +1

    Awesome video thapa, bhai keep it up.

    • @the_good_bad_actors
      @the_good_bad_actors 3 ปีที่แล้ว

      Bhai 2 mahine phle se kr rhe the🙄👍😭

    • @shubhamk840
      @shubhamk840 3 ปีที่แล้ว

      @@the_good_bad_actors are bhai, wo to asehi bs man kiya to aakar comment kr diye, dekh nhi rhe the.

    • @DkAg-z4u
      @DkAg-z4u 6 หลายเดือนก่อน

      HI All coders , i created npx create-react-app handlebar, how can i use handlebar in reactjs pls help if anybody know give me some idea . it is possible or not

  • @BrownguyArea
    @BrownguyArea 4 ปีที่แล้ว +6

    Hello Vinod, You are doing great. My earnest request you to do a tutorial on "Lazy Loading" concept with a project. Desperately waiting to know the details about that. Hope to see you soon on that particular concept.

  • @ni1815
    @ni1815 2 ปีที่แล้ว

    Thank you brother 🥰🥰🥰🥰🥰🥰
    Bs ek galti ki bajah se nhi chal raha tha 🥰🥰🥰🥰🥰🥰 ab chal gya 🥰🥰🥰🥰🥰😘😘😘😘😘😘😘😘😘😘😘😘

  • @vasusharma3527
    @vasusharma3527 3 ปีที่แล้ว +2

    after making hbs file i when i run app.js no CSS is there using handlebars on opening local host just plain HTML file

  • @tejasjani2544
    @tejasjani2544 4 ปีที่แล้ว +7

    Sir 😥 template engine hi expressJs ke sath use kar sakte he dynamic data ko show karva ne ke liye ! To
    ReactJs ko kese use karenge?
    😬 I got completely confused.
    Sir please reply me OR explain in next video.❤️

    • @aviseksahoo1953
      @aviseksahoo1953 4 ปีที่แล้ว

      good qn .. yes you can use template engine but it's complicated , so you should use react or angular for forntend purpose

    • @DkAg-z4u
      @DkAg-z4u 6 หลายเดือนก่อน

      HI All coders , i created npx create-react-app handlebar, how can i use handlebar in reactjs pls help if anybody know give me some idea . it is possible or not

  • @rishiraj2548
    @rishiraj2548 4 หลายเดือนก่อน +1

    content starts at 8:40

  • @shibamkumarpatra3619
    @shibamkumarpatra3619 10 หลายเดือนก่อน +1

    if we are using react then also we have to use template engine ?

  • @NITESHSINGHNRS
    @NITESHSINGHNRS 8 หลายเดือนก่อน

    best teacher...

  • @akashahmed87
    @akashahmed87 3 ปีที่แล้ว

    nice Video Vai !
    Love from Bangladash

  • @timepass-sy5um
    @timepass-sy5um 2 ปีที่แล้ว

    Thanks bhai bhot haelping video ha

  • @MoazzamFayyaz-e5z
    @MoazzamFayyaz-e5z ปีที่แล้ว

    thanks buddy for this tutorial i was frustrating about pug etc it's simple and easy

  • @Hootyapaa
    @Hootyapaa ปีที่แล้ว

    Osm explanation 🔥

  • @gyangouravdesarkar265
    @gyangouravdesarkar265 2 ปีที่แล้ว

    Nice video Thapa sir...

  • @randomavghuman
    @randomavghuman ปีที่แล้ว +1

    thanks , this video cleared a lot of my doubts, when we did the weather app project i was wondering if there was an easy way to replace the data from api, and this makes it so easier.

  • @deepukathait6916
    @deepukathait6916 3 ปีที่แล้ว

    Very usefull easy to learn thnku 💕💕💕 boom boom 💣💥💣💥💣💥

  • @kamalCode
    @kamalCode 4 ปีที่แล้ว +5

    Sir, microservice in nodejs and cloud hosting server setup for new developers

  • @nitinbhalani5420
    @nitinbhalani5420 ปีที่แล้ว

    Helpful video thanks you so much sir 🙏

  • @UandMe-yz1rw
    @UandMe-yz1rw ปีที่แล้ว

    Hi Thapa, You are doing a great job, and Thank you so much😊😊

  • @faisalmahmood8055
    @faisalmahmood8055 ปีที่แล้ว

    Thanks Very Nice

  • @RohiTECH001
    @RohiTECH001 ปีที่แล้ว

    which template engine is most usable nowaday

  • @cruzegaming151
    @cruzegaming151 ปีที่แล้ว

    Like comment done ❤ and thanx for awesome videos❤

  • @AmanGupta-rh5xz
    @AmanGupta-rh5xz 3 ปีที่แล้ว

    sir konsa tune use kartein ho video ke end mai I love that.

  • @Sp-px7gn
    @Sp-px7gn 4 ปีที่แล้ว +1

    Awesome 🎥videos

  • @The_Guiders_Consultancy
    @The_Guiders_Consultancy 2 ปีที่แล้ว +1

    Error: Failed to lookup view "index" in views directory "E:\Express\src\views"
    plese resolve this issue

  • @EWorldHub
    @EWorldHub 4 ปีที่แล้ว

    Superb 🔥😈🔥

  • @SaloniSingh-rn6sm
    @SaloniSingh-rn6sm 9 วันที่ผ่านมา

    Sir css file, and javascript are not fetch after index.html move to index.hbs

  • @venkatchalam6385
    @venkatchalam6385 ปีที่แล้ว

    Thapa ji pls explain little bit slowly,so we understand so better

  • @shaktilab
    @shaktilab 11 หลายเดือนก่อน +1

    can you use react in ejs template?

  • @Whatever-jm2ul
    @Whatever-jm2ul 2 ปีที่แล้ว

    thapa is new age papa

  • @nishit4939
    @nishit4939 ปีที่แล้ว +1

    13:24 But you said before that the code was executed in top-to-bottom order? Then how can we use different pages and render them, suppose first i render or send a static website with the use of express.static(path) then i want to render my contact.hbs page with the use of app.get(). But it only render the first code that is express.stati(path), so what about the contact. hbs file?? i hope you guys understand... if anyone has a solution for it, then please reply me :) Bcoz I don't understand.

  • @arshsharma3591
    @arshsharma3591 3 ปีที่แล้ว

    really helpul bhai

  • @durbarchakrabarty7251
    @durbarchakrabarty7251 3 ปีที่แล้ว +1

    if there are multiple html files inside the public folder such that any one of them is hyperlinked to another by the anchor tag, how can I use the express.static() method?

  • @mansha4963
    @mansha4963 4 ปีที่แล้ว +1

    Awesome 😲

  • @factomindset1407
    @factomindset1407 ปีที่แล้ว +2

    keep your views folder inside src accordingly then it will not show any error

  • @nithinmanjadiyil8166
    @nithinmanjadiyil8166 4 หลายเดือนก่อน

    Is there any other ways by which we can add demo names instead of the placeholders and still do the same functionality ?
    i mean, like we receive a html page (with some identifiers ofc to identify where to change the values) but the html page would look like a actual page instead with some weird texts.
    Just asking, if you guys faced a similar situation, please share how to solve this .

  • @usmanmughal5916
    @usmanmughal5916 4 ปีที่แล้ว +1

    Thapa G express ke bad MongoDB ka course aye ga k ni?

  • @talhakhan4423
    @talhakhan4423 2 ปีที่แล้ว

    this one was good

  • @underworld-of-gaming
    @underworld-of-gaming 2 ปีที่แล้ว

    Thanks Bhai 😁

  • @akashbendre5536
    @akashbendre5536 3 ปีที่แล้ว +1

    Can I use hbs to create dynamic table that fetches data from SQL database?? Pls answer I am stuck😭

  • @simranbanwait
    @simranbanwait 2 ปีที่แล้ว

    Agar thapa bhai nahi hote to hum gareebon ka kya.. hota…

  • @sajjadmollahshuvo580
    @sajjadmollahshuvo580 2 ปีที่แล้ว +3

    when i copy all the code to index.hbs file then my css file doesnt load. what to do ?

    • @amarjeetkumar5456
      @amarjeetkumar5456 ปีที่แล้ว

      Same problem bro

    • @Kiisshh_1
      @Kiisshh_1 ปีที่แล้ว

      const staticPath = path.join(__dirname,"../public");
      //public folder contains all the files to be served
      app.use(express.static(staticPath));
      Write these lines before app.set('view engine','hbs'); in index.js file

  • @rajuraj1257
    @rajuraj1257 4 ปีที่แล้ว

    Nice video.Thanks

  • @JunaidKhan80121
    @JunaidKhan80121 3 ปีที่แล้ว +4

    can't we use react instead of template engine?

  • @muritalaoludege
    @muritalaoludege 2 ปีที่แล้ว

    Please I have a question, I have more than one collection which I want pass to my index page, please how can I do it

  • @aryankhandelwal15
    @aryankhandelwal15 ปีที่แล้ว

    i am getting html inside views without css and images applied. I mean It cannot fetching the assets?

  • @shivangijoshi363
    @shivangijoshi363 ปีที่แล้ว

    Apne itne sare folders and jo cmd se files bnae wha m bht confuse hogyi and output m mjhe kch smjhni aya

  • @azimmemon4922
    @azimmemon4922 ปีที่แล้ว +1

    Failed to lookup view error solution:
    In the terminal just type node src/index.js

  • @chaudharisunny4217
    @chaudharisunny4217 2 ปีที่แล้ว

    Thank u so much 🤗🤗🤗

  • @nakulrawal7605
    @nakulrawal7605 ปีที่แล้ว

    what if github is looking for index.html and we have index.hbs ....unless its index.html we wont be able to see the page any solution????

  • @hanshal1602
    @hanshal1602 4 ปีที่แล้ว

    this video is helpful.

  • @abhishekparmar5207
    @abhishekparmar5207 6 หลายเดือนก่อน +1

    Sir getting error -
    Cannot find module 'hbs' kya karu koi batav yrr

  • @nayanmore7460
    @nayanmore7460 3 ปีที่แล้ว +1

    Failed to lookup view "index" in views directory
    What to do now

  • @pritamchakraborty4407
    @pritamchakraborty4407 4 ปีที่แล้ว

    This video is awsome

  • @Rahul-kc4gf
    @Rahul-kc4gf 3 ปีที่แล้ว +2

    Anyone have this issue.
    [ Failed to lookup view "index.hbs" in views directory "E:\expressjs\src\views" ]
    only move views folder in scr folder.

  • @naishadhdave776
    @naishadhdave776 4 ปีที่แล้ว +1

    Ok sir. Now it is came live....

  • @shehrozkhan1461
    @shehrozkhan1461 2 ปีที่แล้ว

    React js ko frontend k liye use kr skty ha node k sth ?

  • @dhruvmanktala3206
    @dhruvmanktala3206 4 ปีที่แล้ว +3

    please make a video of React+php

  • @nontechbg
    @nontechbg 2 ปีที่แล้ว

    Thank you 😇

  • @DkAg-z4u
    @DkAg-z4u 6 หลายเดือนก่อน

    i create npx create-react-app handlebar, how can i use handlebar in reactjs pls help

  • @ezone2726
    @ezone2726 4 ปีที่แล้ว +1

    Teach us also password js...and more advance in express js ...
    Thank you ❣️

    • @javascriptwar9525
      @javascriptwar9525 4 ปีที่แล้ว

      th-cam.com/video/TdjG5SRlttk/w-d-xo.html

    • @ezone2726
      @ezone2726 4 ปีที่แล้ว

      @@javascriptwar9525 thank you vai❣️❣️

    • @javascriptwar9525
      @javascriptwar9525 4 ปีที่แล้ว

      @@ezone2726 🙏 me bhi thapa sir se inspire hu ..mujhe ese send nahi karna chaiye tha par socha ki kisiko jarurat par rahi toh kardiya..

  • @rakeshkumaryadav1117
    @rakeshkumaryadav1117 2 ปีที่แล้ว +2

    Html file is showing but style.css file is not implementing it is pure html
    How add css file
    Please Clear my doubt
    Node/ExpressJS
    In ExpressJS
    Folder present: musicapp ,views,src
    In music app index.html, style.css
    in views: index.hbs code of musicapp html
    in src: index.js
    node\expressJS>node src/index.js

    • @MohabbatRJ
      @MohabbatRJ ปีที่แล้ว

      use in the hbs folder

  • @underworld-of-gaming
    @underworld-of-gaming 2 ปีที่แล้ว

    Thanks 🙏

  • @Prasadrkmca
    @Prasadrkmca 3 ปีที่แล้ว

    Sir, really liked videos... Please do on Angular also

  • @asifshaikasif4128
    @asifshaikasif4128 ปีที่แล้ว

    Why cant we use readfile module and then use replace method
    For dynamic data

  • @smartyarshad303
    @smartyarshad303 4 ปีที่แล้ว

    Sir Mein nodejs ke Saath MYSQL use kar raha hoon.
    On click per database Mein 3 4 operation perform karna padhta hai. At time 3 4 user tak ho jata but ek Saath 50 user bhi Aa rahe hai toh operation perform nahi ho raha hain. I already use async await.
    Its a quiz game in there is group of 6 contestant.
    So if suppose there is 600 click at a time there must 100 container.

  • @salonirathi1158
    @salonirathi1158 3 ปีที่แล้ว

    Nice video 👌👌👌

  • @turzosaha3789
    @turzosaha3789 3 ปีที่แล้ว

    Sir, you just directly copy the html part in the hbs, but what about the css file? without setting the right path of css file, how the server can run ?

    • @rimanmohanty2011
      @rimanmohanty2011 2 ปีที่แล้ว

      bro app.use(express.static(staticPath)); is baley main link hai na

    • @MohabbatRJ
      @MohabbatRJ ปีที่แล้ว

      use in the hbs folder

  • @abhishekk321
    @abhishekk321 3 ปีที่แล้ว +3

    Error: Failed to lookup view "index" in views directory show error please help me

    • @WirelessBhai
      @WirelessBhai 3 ปีที่แล้ว +7

      Put your "views" folder inside "src"

    • @MeetPatel-lm6wx
      @MeetPatel-lm6wx 3 ปีที่แล้ว

      @@WirelessBhai thanks , that's work

    • @Codingkite
      @Codingkite 3 ปีที่แล้ว

      @@WirelessBhai thank you bhai its working

    • @ShubhamSingh-eg6wq
      @ShubhamSingh-eg6wq 3 ปีที่แล้ว

      Thanku so much bhai ❤️

    • @owaiskhan7607
      @owaiskhan7607 3 ปีที่แล้ว

      @@WirelessBhai why it works when we move our views into src but thapas code is working without it

  • @aadityakumar2103
    @aadityakumar2103 2 ปีที่แล้ว

    11th video is not available??

  • @sushilyadav-dm5rr
    @sushilyadav-dm5rr 4 ปีที่แล้ว +1

    thapa bro aapka ye view engine sahi se work nahi kar raha hai

  • @tejasjhamnani7724
    @tejasjhamnani7724 4 ปีที่แล้ว +1

    Thapa sir I am getting error:
    Failed to lookup view "index" in views directory "C:\Express JS\src\views"
    I checked the code 3-4 times everything is proper. Can u please guide sir

    • @rutvikmehta4657
      @rutvikmehta4657 4 ปีที่แล้ว +4

      just add the lines:
      app.set('views', '../views');
      app.set("view engine", "hbs");

    • @aviseksahoo1953
      @aviseksahoo1953 4 ปีที่แล้ว

      @@rutvikmehta4657 what is the mean of first app.set ?

    • @ujjwaldeep5175
      @ujjwaldeep5175 4 ปีที่แล้ว

      @@rutvikmehta4657 thanks it's working, but why, can you explain??

    • @sachinlingwal2325
      @sachinlingwal2325 3 ปีที่แล้ว

      @@rutvikmehta4657 thank u bro....u solved my problem

  • @mrsumankumar2110
    @mrsumankumar2110 4 ปีที่แล้ว

    Main ek coding se website Banya hua us website ko domain hosting se bhi Jod Diya hun ab mujhe content dala hai to kaise dalu please bataya Maine ye questions har youtuber se puch raha hu kaoi reply nahi karte hai aap hi se ummid hai

  • @AshutoshKumar-ek3oy
    @AshutoshKumar-ek3oy 2 ปีที่แล้ว

    views wale hbs file CSS ni mil raha h usko kya kru?

  • @nayanasawa7437
    @nayanasawa7437 3 ปีที่แล้ว

    I got an error like failed to lookup view "index.pug" in views directory please help me

  • @vishalkyadav3805
    @vishalkyadav3805 ปีที่แล้ว

    bro when i use hbs to load a page it doesn't get styles?

  • @penuboluprudvikrishna6046
    @penuboluprudvikrishna6046 2 ปีที่แล้ว +2

    Hi brother can we change fontsize of a string dynamically depending on text characters using handlebars

  • @aliyanarjis3118
    @aliyanarjis3118 8 หลายเดือนก่อน

    thnks sir

  • @ayush1771
    @ayush1771 2 ปีที่แล้ว +1

    How to use bootstrap in pug ??

  • @sukanyachakraborty2893
    @sukanyachakraborty2893 3 ปีที่แล้ว +1

    Bro the CSS code is not getting identified if the index.html is copied to index.hbs. any suggestions ?

    • @darkraven7834
      @darkraven7834 ปีที่แล้ว

      Me also

    • @Kiisshh_1
      @Kiisshh_1 ปีที่แล้ว +1

      @@darkraven7834 const staticPath = path.join(__dirname,"../public");
      //public folder contains all the files to be served
      app.use(express.static(staticPath));
      Write these lines before app.set('view engine','hbs'); in index.js file

    • @Kiisshh_1
      @Kiisshh_1 ปีที่แล้ว

      const staticPath = path.join(__dirname,"../public");
      //public folder contains all the files to be served
      app.use(express.static(staticPath));
      Write these lines before app.set('view engine','hbs'); in index.js file

    • @sukanyachakraborty2893
      @sukanyachakraborty2893 ปีที่แล้ว

      @@Kiisshh_1 Thanks bro!! However, it has been solved by now

    • @parasshankhwar8686
      @parasshankhwar8686 ปีที่แล้ว

      ​@@sukanyachakraborty2893bro is wale video ka source code de do please

  • @alkeshkaba5683
    @alkeshkaba5683 ปีที่แล้ว

    Hello Sir,
    Can you please Explain Difference Between express-handlebars, handlebars, hbs , I am getting very confused

  • @abishekshah1693
    @abishekshah1693 3 ปีที่แล้ว

    can you make complete video on ejs template engine ?

  • @AbdulManan-bk6hw
    @AbdulManan-bk6hw 3 ปีที่แล้ว

    you fellow Andrew Mead Course of Udemy

  • @Tima-ql7on
    @Tima-ql7on 3 ปีที่แล้ว +1

    Style css in not apply in hbs extension but how you do this

    • @Trishul-Industries
      @Trishul-Industries 3 ปีที่แล้ว

      pata chal kaise hoga

    • @Trishul-Industries
      @Trishul-Industries 3 ปีที่แล้ว

      i am still facing this issue

    • @Tima-ql7on
      @Tima-ql7on 3 ปีที่แล้ว

      @@Trishul-Industries
      Tell express about your static files :
      app.use(express.static(your_static_files_folder_path);

  • @cheapassignmenthelp6030
    @cheapassignmenthelp6030 3 ปีที่แล้ว

    sir reactnative pe complete course bana dijiye

  • @frzamno0r691
    @frzamno0r691 2 ปีที่แล้ว

    css and images tww load hi nhh hoparahi hay pr jb head k undr css likha tww css kaam krgya

  • @user-of4ww3oq4n
    @user-of4ww3oq4n 4 หลายเดือนก่อน

    14:00 par scss is not comming. How to solve this problem

  • @zaeemjaved6850
    @zaeemjaved6850 3 ปีที่แล้ว

    Bro my CSS is not being applied to HBS file. My path is correct for stylessheet. Please Help.

    • @jessicagulati3596
      @jessicagulati3596 3 ปีที่แล้ว

      Same problem with me.. Did you solve that issue or still stuck

    • @MohabbatRJ
      @MohabbatRJ ปีที่แล้ว

      use in the hbs folder

  • @ritikjain3975
    @ritikjain3975 3 ปีที่แล้ว

    help my css in not working in dynamic one

  • @Astrrick
    @Astrrick 3 ปีที่แล้ว

    My css is not reflecting on the index.hbs file...
    my link for the style sheet is css/index.css
    folder structure: public/css/index.css
    Help.

    • @chiraggupta9547
      @chiraggupta9547 3 ปีที่แล้ว

      Yes same problem anyone answer plz

    • @unfiltered_with_yogi
      @unfiltered_with_yogi 3 ปีที่แล้ว +1

      @@chiraggupta9547 in index.js use const staticpath = path.join(__dirname,"../public/"); and then in the hbs folder

    • @chiraggupta9547
      @chiraggupta9547 3 ปีที่แล้ว

      @@unfiltered_with_yogi ok bro.

  • @usamaali-0514
    @usamaali-0514 2 ปีที่แล้ว

    how we can link our css file and call images or icons in index.hbs?
    please let me know asap. thanks

    • @daminipawan__official1397
      @daminipawan__official1397 2 ปีที่แล้ว

      Make a CSS folder in public folder
      And link the CSS file in hbs file
      href="CSS/style.css"
      And same for images

  • @picklughosh9994
    @picklughosh9994 3 ปีที่แล้ว

    no such file or directory error occure can you help me how to fix it

  • @fahimhassan4387
    @fahimhassan4387 4 ปีที่แล้ว +2

    please use React js as front End

  • @aksaurooj838
    @aksaurooj838 4 ปีที่แล้ว +1

    it shows an error...failed to lookup index in views directory