MERN Tutorial #5: Controllers in Express.js 🔥 Managing Your Application's Logic

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 60

  • @jk-sm6qr
    @jk-sm6qr 11 місяців тому +4

    Very simplified, Thank you

  • @GameStrings
    @GameStrings Рік тому +1

    I am following this series 🎉🎉

  • @rutvipatel9813
    @rutvipatel9813 3 місяці тому

    Best mern series sir

  • @Daily_short
    @Daily_short 5 місяців тому

    Best mern series, maza aa gya

  • @VikramSingh-np8ji
    @VikramSingh-np8ji Рік тому +4

    Yes, I agree that we wait for a day and we can expect atleast upload videos with 1 To 2 hour duration pls sir

    • @faizanmomin5448
      @faizanmomin5448 Рік тому

      add parenthisis { }. const {home}=require('../controllers/auth_controller')

  • @Akash_Ghosh256
    @Akash_Ghosh256 Рік тому +1

    keep uploading I am following you sir

  • @AmeeriaSardarviaFsd
    @AmeeriaSardarviaFsd 10 місяців тому +2

    osm sir really osm

  • @DecentProgrammer
    @DecentProgrammer 22 дні тому

    best content

  • @spritualgamer5122
    @spritualgamer5122 2 місяці тому

    which extensions are you using in your vscode editor

  • @nibhriti408
    @nibhriti408 5 місяців тому +2

    to everyone, if your nodemon isnt working try adding the command -> "start": "nodemon yourFileName.js" in your package json file in the scripts section. Here, yourFileName will be server.js if you are keeping the same file name as the video. it will look kind of this:
    "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon server.js"
    },

  • @muhammadhassan-qn2dc
    @muhammadhassan-qn2dc Рік тому +7

    Sir wo Ecommerce wala API kaam nahi kar rahi

    • @kadamaditya101
      @kadamaditya101 11 місяців тому +2

      It needs to be created by it self brother then

  • @nafishaarjoo1967
    @nafishaarjoo1967 Рік тому +1

    Which means we have to make the code readable, and have to make it simple right?

  • @sarkari-mahiti
    @sarkari-mahiti Рік тому

    Happy diwali sir 🎉🕯

  • @devilgaming-m12
    @devilgaming-m12 9 місяців тому

    What's tha name of the theme you are using in your VS Code

  • @vaibhav5499
    @vaibhav5499 Рік тому

    Sir yah Jo menn series hai ismein ham agar node.js and express.js agar humne nahi pade aur aur kya ham is mern series se node.js and express JS ismein complete ho sakti hai kya

  • @jalluchakri1528
    @jalluchakri1528 Рік тому +1

    Can please add the middlewares in the series please

  • @codevehicle
    @codevehicle Рік тому

    🎉🎉 thanks sir jij

  • @Topviral267
    @Topviral267 Рік тому

    Thanks sir

  • @nibhriti408
    @nibhriti408 5 місяців тому

    He also did not use middle ware, you can either use cors (npm i cors), then require it in the program or you can use
    app.use((req, res, next) => {
    console.log(`${req.method} ${req.url}`);
    next(); // Pass control to the next middleware function
    });
    this is for declaring global middleware . you can then carry on with your code without crashing anymore :)

  • @meetshah344
    @meetshah344 2 місяці тому

    hi sir
    i have error (Uncaught Error Error: Cannot find module '../controllers/auth-controller')
    like this pls anyone reply ?

  • @sayansen2908
    @sayansen2908 Рік тому +4

    sir i am getting error after using contoller

  • @Nitiksha-e2m
    @Nitiksha-e2m 9 місяців тому

    when I am trying with nodemon, I am getting error of app crashed. Please suggest the solution

  • @ShounPaul-s4l
    @ShounPaul-s4l 9 місяців тому

    best

  • @priyanka13121986
    @priyanka13121986 Рік тому

    from where I got the code. I follow the steps and got and error
    C:\D-Drive\mernstack\server
    ode_modules\express\lib
    outer
    oute.js:211
    throw new Error(msg);
    ^
    Error: Route.get() requires a callback function but got a [object Object]
    Please let me know how can I fix this

    • @softenginetechnologies9956
      @softenginetechnologies9956 10 місяців тому +2

      use
      router.get("/",home);
      router.get("/register",register);
      instead of
      router.route("/").get(home);
      router.route("/register").get(register);
      This will resolve the error

    • @nsbofficial3908
      @nsbofficial3908 3 дні тому

      @@softenginetechnologies9956 tbhi ni horra hai

  • @samarthsaxena8987
    @samarthsaxena8987 Рік тому

    jb ma export kr rha hu "home" ko to error aa rhi ha Route.get() requires a callback function but got a [object Object]

    • @faizanmomin5448
      @faizanmomin5448 Рік тому +3

      const {home}=require('../controllers/auth_controller') add this

    • @AkshayThakur-rc8ol
      @AkshayThakur-rc8ol 9 місяців тому

      module.exports={home,register}
      const {home}=require('../controllers/auth_controller')
      check this

    • @ashishbhardwaj9390
      @ashishbhardwaj9390 7 місяців тому

      ​@@faizanmomin5448thankyou 🐤

  • @poojasangitrao8090
    @poojasangitrao8090 8 місяців тому

    how to fix this?
    Error: Cannot find module 'express'
    Require stack:
    - C:\Users\mern
    outer\auth-router.js
    - C:\Users\mern\server\server.js

  • @vijendrasharma1375
    @vijendrasharma1375 Місяць тому

  • @ravishbisht502
    @ravishbisht502 Рік тому +2

    Sir source code bolte ho aap free me de raha hu muje to nhi dikhta kahi free me source code😢😢😢

  • @Shubhus_World
    @Shubhus_World Рік тому +2

  • @ombharsakle
    @ombharsakle Рік тому +2

    code nahi mil raha hai

  • @muhammadhassan-qn2dc
    @muhammadhassan-qn2dc Рік тому +1

    Sir please sort this issue

  • @Topviral267
    @Topviral267 Рік тому

    ❤❤❤

  • @subedi_js
    @subedi_js 9 місяців тому

    8:17

  • @sahilDhotre-tu5cg
    @sahilDhotre-tu5cg 2 місяці тому

    where is the notes

  • @abhissek_07
    @abhissek_07 11 місяців тому

    bhaiya it would be great if you give the source code for free

  • @JavaScript_Boy
    @JavaScript_Boy Рік тому +2

    one lakh 🤣🤣🤣🤣

  • @Dhruba3277
    @Dhruba3277 Рік тому +3

    Sab copy content he .

  • @Dhruba3277
    @Dhruba3277 Рік тому +2

    Ghanta awesome video he.
    Kush vi Naya nahi he.
    Chutiyapa karke views bara rahe ho.
    Short short video banake playlist lamba kar rahe ho, bas pese kamane ke alawa kush vi nahi he..

    • @ThapaTechnical
      @ThapaTechnical  Рік тому

      Bhai kaha bura laga batawo jara.. previous video me
      error middilware, zod validations, controllers, routes kuch nai tha.. n abhi tho bahoot kuch baki hai.. tho copy kaha se hua batawo.. kuch bhi mat likho bhai..

    • @Dhruba3277
      @Dhruba3277 Рік тому

      @@ThapaTechnical content is too good.too short video , shuru hote hi khatam hota he..make little bit longer than usually you make..

    • @Dhruba3277
      @Dhruba3277 Рік тому +1

      Students can't wait for 1 day to take next step..so make little bit long .

    • @obanai6054
      @obanai6054 Рік тому

      New toh hai bhai concept clear kar diya ab practice khud karo