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" },
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
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 :)
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
use router.get("/",home); router.get("/register",register); instead of router.route("/").get(home); router.route("/register").get(register); This will resolve the error
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..
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..
Very simplified, Thank you
I am following this series 🎉🎉
Best mern series sir
Best mern series, maza aa gya
Yes, I agree that we wait for a day and we can expect atleast upload videos with 1 To 2 hour duration pls sir
add parenthisis { }. const {home}=require('../controllers/auth_controller')
keep uploading I am following you sir
osm sir really osm
best content
which extensions are you using in your vscode editor
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"
},
write "nodemon server.js" this
Sir wo Ecommerce wala API kaam nahi kar rahi
It needs to be created by it self brother then
Which means we have to make the code readable, and have to make it simple right?
Happy diwali sir 🎉🕯
What's tha name of the theme you are using in your VS Code
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
Can please add the middlewares in the series please
🎉🎉 thanks sir jij
Thanks sir
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 :)
Thanks
hi sir
i have error (Uncaught Error Error: Cannot find module '../controllers/auth-controller')
like this pls anyone reply ?
sir i am getting error after using contoller
check authcontroller import statement once. @9:27
same yar thik nahi horaha
when I am trying with nodemon, I am getting error of app crashed. Please suggest the solution
best
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
use
router.get("/",home);
router.get("/register",register);
instead of
router.route("/").get(home);
router.route("/register").get(register);
This will resolve the error
@@softenginetechnologies9956 tbhi ni horra hai
jb ma export kr rha hu "home" ko to error aa rhi ha Route.get() requires a callback function but got a [object Object]
const {home}=require('../controllers/auth_controller') add this
module.exports={home,register}
const {home}=require('../controllers/auth_controller')
check this
@@faizanmomin5448thankyou 🐤
how to fix this?
Error: Cannot find module 'express'
Require stack:
- C:\Users\mern
outer\auth-router.js
- C:\Users\mern\server\server.js
npm i express type on terminal
Sir source code bolte ho aap free me de raha hu muje to nhi dikhta kahi free me source code😢😢😢
😆😆
❤
🎉
code nahi mil raha hai
Kal se start hoga code milna ok
Sir please sort this issue
❤❤❤
8:17
where is the notes
bhaiya it would be great if you give the source code for free
one lakh 🤣🤣🤣🤣
Sab copy content he .
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..
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..
@@ThapaTechnical content is too good.too short video , shuru hote hi khatam hota he..make little bit longer than usually you make..
Students can't wait for 1 day to take next step..so make little bit long .
New toh hai bhai concept clear kar diya ab practice khud karo