Hi friends, I checked your comments in the previous video. And majority of people wanted Node.js and MongoDb as backend. However, that doesn't mean we won't build other apps using different technologies. Let me know in the comments what else you'd like to see for the next projects. Love ya
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
I seriously like your teaching style...like a sensei...voice is calm and reassuring... documentation use is spot on...helps remind us that this is all a process not magic...wax on...wax off
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
if you are having problem at 1:38:15, list of array is being fetched from insomnia/postman but not showing in React app. You gotta update the packages 'npm update --force', and remove '/api' from the proxy field and add it in the useState url's place
my solution, I add cors in api and after change useFetch const Featured = () => { const { data, loading, error } = useFetch( "localhost:8800/api/hotels/countByCity?cities=berlin,madrid,london" ); console.log(data)
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
For those who are getting stuck at 1:46:20 where they are not getting the desired results of 'limit'. You can try this: Use destructuring to get limit and featured from req.query like this---> const {limit,featured}=req.query; and then while fetching data write fetching line like this---> const hotels=await Hotel.find({featured:featured}).limit(limit);. After this getHotels code will be look like this : export const getHotels=async(req,res,next)=>{ try { const {limit,featured}=req.query; const hotels=await Hotel.find({featured:featured}).limit(limit); return res.status(200).json(hotels); } catch (err) { next(err); } } Hope it helps!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@@SwarnarkaDas check you "countByCity" function in "api/controllers/hotel.js" It should be like this: export const countByCity = async (req, res, next) => { const cities = req.query.cities?.split(","); if (cities) { try { const list = await Promise.all( cities?.map((city) => { return Hotel.countDocuments({ city: city }); }) ); return res.status(200).json(list); } catch (err) { next(err); } } }; after this check its route in "api/routes/hotels.js" make sure that coreect route is present for the function It should be like this: router.get('/countByCity',countByCity); If you've done both of these things correctly then code must be run properly
Great tutorial and very clear in way of explaining. Hope you don't mind but would love to use certain smaller parts for my project. Your complete project and structure is a great example to learn from, in my opinion. Thank you so much for your contribution in my learning path. Will try to watch more videos when manage to have some free time. Thank you once again.
Hello Lama, I am a junior full stack dev and you have a contribution in my learning process before I landed my first job. Amazing content, rally easy to follow. Thanks a lot. Also, maybe some postgres involved content would be awesome for learners as it is crucial to know to attract more employers.
My favorite channel. Thanks a bunch for putting a lot of effort into making such instructive videos. The quality of your videos is as always top-notch. I can't thank you enought!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
It's always good to see such a useful complete tutorial for absolutely free. Lama if you are willing to provide courses where people can learn the technologies you use in your videos. I'm sure many will be willing to pay and support you.
That's a huge project for a UA-cam video, it's almost impossible to find something like that, please keep up with your work. I would also love a big project like that with Typescript, too see how you manage all the types and interfaces.
Man I appreciate the time you take to bring to us this informative yet valuable content with clear explanation, His mode of delivery reveals that he is knowledgeable about the topic. Thanks Lama Dev
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Hi Lama, thank you so much for your wonderful videos, I learned a lot and made my job easier. Also, I have a small suggestion, can you add a difficulty level to each video, like between 1-5? Because after one video, I move on to the next one, but you have so many videos that I don't know which one is right for my skill level. But if you have a difficulty level, it might be easier for me to find the next video to learn from. Hope you can think about it if you have enough time. Thanks
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
I am learning a lot from you. I think your first approach was right for not using ''next'' in verifyToken under verifyUser and verifyAdmin function. Because, now it will go to next outer function instead of inner function, if I understood correctly.
@@hershey92 Hi bro not sure if you still need this but I had the same issue and figured it out, I think. Inside of the verifyUser function we call verifyToken, which takes 3 parameters: req, res and next. if you give it 4 parameters in the nested function it will not executed the callback function and it will go directly to the next middleware(updateUser, updateHotel etc etc). however if no cookie is in place it will have no information for req.user.admin( which is required in the body of the nested callback). anyways it is solved by checking of req.user exists. I am just a humble intern so I think this is how it works, pls correct me if I am wrong, anyway my code works as it should. export const verifyUser = (req,res,next) =>{ verifyToken(req,res,()=>{ if(req.user.id === req.params.id ||req.user?.isAdmin){ console.log(req.user.isAdmin) next() }else{ return next(createError(403, "You are not autorized")) } }) } export const verifyAdmin = (req,res,next) =>{ verifyToken(req,res,()=>{ if(req.user?.isAdmin){ next() }else{ return next(createError(403, "You are not admin autorized")) } }) }
Another great content from Lama sir, Can i expect a React-Native course from you because your explanation is superb, I would like to see a React-Native course from you sir, Thank you❤
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
So glad you chose the MERN architecture for the project.. God bless you.. Pls can you add one last series in the video that involves email notifications or text message notification when a reservation is made for both the user and the admin.. and finally can you upload the project with a domain on a server.. I would be very grateful if any of this feature I requested above is implemented.. thank you in advance . I appreciate the impact once more...
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@Lama Dev sir please do a big project like LMS(college management system) using redux toolkit, nodejs , and reactjs MERN(technology). Your tutorial is so nice. Thank you so much for this wonderful effort
The good thing about Lama is that you will never find errors,code is easy to understand and write ,,,keep up the good work,you have helped me alot 🇰🇪🇰🇪🇰🇪
Can you make a complete full bug tracker web app please that would be Soo helpful, we really appreciate what you're making, quality content for free 🔥.
Thank you lema, it was really helpfull for me. perhaps this is the best learning method i have seen. good job lema. i would really be glad to pay for such kind of tutorial.
Nice Job Lama! Your projects are really inspiring and has been of great help to me. I think the next tutorial should be on making "An appointment booking website using react". I already made a research on this (UA-cam & internet generally) and the ones I found are either made in WordPress or employed a plug-in. I think making this could really be helpful to take this channel to it next bigger audience as you could possibly be the first to implement it on a UA-cam channel. Merci beaucoup once again!
Are you talking like one that interacts directly with your webcam? That would be cool. I feel just making the appointments is an easy adaptation from the skills learned in this one.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
At the timestamp 3:10:33 the users table doesn't show up and gives an error of rows is undefined in console You can fix this by adding qoutations in the useState in the DataTable.jsx on line 12 like this const [list, setList] = useState("")
I encounter this same problem but rather get xhr.js:220 GET localhost:8800/api/users 401 (Unauthorized); I tried this but where do I use the list state. Thank your for your feedback
@@brentlombaard7573 kind of strange because if the user was not the admin then he can't access the dashboard, besides it works in Postman but on the client site it doesn't
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Hi Lama Dev .. thank you for the time you spend in creating such useful, creative & educative content. May God Bless you Tremendously. Please, Can you do some/add some sought of notification first to the user when a reservation is made stating that "he just made a reservation" and to the admin saying that he has a new message in his dashboard. secondly, can you add features where the user has his own dashboard that helps him fast-track his reservations. Also can payment gateways be incorporated and can the project be hosted on a VPS using Nginx. thank you in advance. I really appreciate the good work. God Bless you once more.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@@kumarsrijan7566 next in the function parameter means once completed go to the next middleware function. In this case if you add next in verifyToken function's parameter, the next will refer to the middleware after verifyToken function from the routes -- but your routes doesn't have verifyToken, but it has verifyAdmin, so ideally you want the next () -> to refer to your verifyAdmin, so that the next middleware, which in this case is updateHotel is executed. @01:13:15 Lama said it, that the next is referring to verifyToken --> that is the catch. So if you should add next as an parameter to verifyAdmin middleware function and not the verifyToken middleware function. Hope it helps!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Hi @LamaDev, Can you help me at 1:46 as per video I have passed featured=true&limit=2 in the url in thunderclient but my mongodb query returns zero results. Mongodb query not taking limit as limit field instead it is checking for featured=true and limit=2 in database which results zero result and there is no field like limit in the table.
just destructure the req.params for one more value limit and use it in limit part of hotels.find function so right now we have const{min,max,...others}=req.query and change it to const{min,max,limit,...others}=req.query and in the Hotels.find function change the part "limit(req.query.limit)" to "limit(limit)"
For those that verifyAdmin is not working, that is happening because when we call the func verifyToken it returns a next() at the end, so it enters the route func before even initializing the verifyadmin. I hope it helps
Hi Lama, Thanks you so much for such great videos. I learned lot of things in a single vidoe and I know it will increse my cofidence in the these technologies more.
Hi Lama, thanks for the tutorial. At 01:13:16, I noticed that once the 'next' is added to the argument, the function to check 'isAdmin' doesn't run anymore.
Hello mate. Have problem im on part Insomnia program. when add city adress and etc. and click to test on insomnia show Cannot POST /api/hotels. Hotel.js is currect. Hotels.js is "import express from "express" import Hotel from "../models/Hotel.js"; const router = express.Router(); //CREATE router.post("/api", async (req,res)=>{ const newHotel = new Hotel(req.body) try{ const savedHotel = await newHotel.save() res.status(200).json(savedHotel) }catch(err){ res.status(500).json(err) } }) //UPDATE //DELETE //GET //GET ALL export default router"
@spikerrbg 22 Check your index.js file. Perhaps your endpoint is wrongly typed. It should be "/api/hotels" not "api/hotels". Also your hotels.js routes file should be '/' for the insomnia to work at 27:02
If you have probles with .limit() function just pop that "limit" key from your query and use it seperately, idk but this fixed my problem. const { limit, ...query } = req.query; const hotels = await Hotel.find(query).limit(limit);
hey Lama, amazing tutorial. But when I make the PropertyList component ( 1:43:02 ) , the page breaks, and I get a warning in console that data is undefined. Any ideas? anybody? EDIT: actually if I comment the map in the data for the h2 and h1, it reloads ok. EDIT2: solved with the question mark! sorry!
Noice video. Found a little thing in the backend code where the user can update their records, here a non admin can make a put request with isAdmin=true and then can be the admin so just wanted to tell you. PS nicee work
REACT INSTALLATION PROBLEM FIX if you're on Mac then you more than likely got this error "'xcrun: error: invalid active developer path.." don't worry , this is just an apple bug that hopefully will be fixed by the time you see this, But to address the issue, run "xcode-select --install" let it install on your computer. when its done, run the clone code again and you should be fine. Worked for me and hopefully works for you too.
First of all, Thanks for your support. Take love from my heart, Safak ❤️💝 I have a suggestion or request for a Management software like School, Hotel, Hospital, ERP management software. Still now I can't find any kind of MERN management software on UA-cam. Please make this one. I think everyone loves it.
@rowelljayrodriguez9885 bro can u give the description of what is happening inside this project point wise....it would be very much helpful....please bro
If you keep having exporting problems with the error.js file in utils, just export default at the bottom of the file; even tho you exported at the top. It worked for me and hopefully it'll work for you too.
This was a great tutorial indeed thank you lama I really think that if you may take react with Java backend will help us a lot at bigginner level maybe for a school management system that has online quiz tests or something like that
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
hi lama dev, you updated hotel.js(line:15-20) file at 57.11 all of a sudden . so if you mark it on your video it will be very helpful . you are doing great. thanks a lot.
I love useContext with useReducer No we don't need more applications Now we need on top of your previous project AWS S3 file upload AWS ses as mail service CI CD pipeline implementation Docker Nginx AWS EC2 AWS Route 53
Hi friends, I checked your comments in the previous video. And majority of people wanted Node.js and MongoDb as backend. However, that doesn't mean we won't build other apps using different technologies. Let me know in the comments what else you'd like to see for the next projects. Love ya
Graphql incoming ?
Flight Booking MERN
MEAN stack
React and php mysql please
Hi Safak, thanks for new video. Please make project with Typescript!
Why we like Lama Dev
1. Easy to understand
2. Point to Point tutorial
3. No time waste - less talk more code
4. Good projects used in example
TRUE
AMAZING
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
did u found the solution??? Please do give the solution also@@SwarnarkaDas
I seriously like your teaching style...like a sensei...voice is calm and reassuring... documentation use is spot on...helps remind us that this is all a process not magic...wax on...wax off
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
if you are having problem at 1:38:15, list of array is being fetched from insomnia/postman but not showing in React app. You gotta update the packages 'npm update --force', and remove '/api' from the proxy field and add it in the useState url's place
Can you give your insta id i faced one problem in this project
Heyy, im facing the same problem. Could I connect with you over any other medium ???
thank you so much I was facing this problem and it is fixed now.May God bless you.
@@akotech79 please describe your solution and post the code if possible
my solution, I add cors in api and after change useFetch
const Featured = () => {
const { data, loading, error } = useFetch(
"localhost:8800/api/hotels/countByCity?cities=berlin,madrid,london"
);
console.log(data)
One of the most comprehensive tutorials of yours, Lama.
You have such a good design combined with complex functionalities in that booking app.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
For those who are getting stuck at 1:46:20 where they are not getting the desired results of 'limit'. You can try this: Use destructuring to get limit and featured from req.query like this---> const {limit,featured}=req.query; and then while fetching data write fetching line like this---> const hotels=await Hotel.find({featured:featured}).limit(limit);. After this getHotels code will be look like this :
export const getHotels=async(req,res,next)=>{
try {
const {limit,featured}=req.query;
const hotels=await Hotel.find({featured:featured}).limit(limit);
return res.status(200).json(hotels);
} catch (err) {
next(err);
}
}
Hope it helps!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Thank you
@@SwarnarkaDas check you "countByCity" function in "api/controllers/hotel.js" It should be like this:
export const countByCity = async (req, res, next) => {
const cities = req.query.cities?.split(",");
if (cities) {
try {
const list = await Promise.all(
cities?.map((city) => {
return Hotel.countDocuments({ city: city });
})
);
return res.status(200).json(list);
} catch (err) {
next(err);
}
}
};
after this check its route in "api/routes/hotels.js" make sure that coreect route is present for the function It should be like this:
router.get('/countByCity',countByCity);
If you've done both of these things correctly then code must be run properly
Why I will not get data in console 1:36:57
@humanity7880 thanks for the help brother 👍
Great tutorial and very clear in way of explaining. Hope you don't mind but would love to use certain smaller parts for my project. Your complete project and structure is a great example to learn from, in my opinion. Thank you so much for your contribution in my learning path. Will try to watch more videos when manage to have some free time. Thank you once again.
Hello Lama, I am a junior full stack dev and you have a contribution in my learning process before I landed my first job. Amazing content, rally easy to follow. Thanks a lot.
Also, maybe some postgres involved content would be awesome for learners as it is crucial to know to attract more employers.
Hi bro, what project did you create to show the interviewer?
Junior full stack...hmmm.. you are a genius!!!
@@karenmelikyan377 Thanks, but I am not genius at all. Not a necessity.
Hello please can you tell me that in this project how we logout from website
@@harshsinghal8527 whenever I get the time, I will check.
My favorite channel. Thanks a bunch for putting a lot of effort into making such instructive videos. The quality of your videos is as always top-notch. I can't thank you enought!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Lama, Brother. Your techniques for modularity and overall problem solving are insane. Love you. I hope I will have the same after a year.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
This is my new favorite channel, thanks for this amazing tutorial Lama Dev!...
It's always good to see such a useful complete tutorial for absolutely free.
Lama if you are willing to provide courses where people can learn the technologies you use in your videos.
I'm sure many will be willing to pay and support you.
I could not connect to mongoDB please help me bro
@@amazingworld-i1h in your .env, use 'equal to' sign instead of colon...
@@vaalarivan_p Hey I got a problem while doing this project can you please help me
@@sayanmaity2694 What kinda problem??
Why m i getting like this nodemon app crashed - waiting for file changes before starting...
Best MERN project tutorial on youtube
That's a huge project for a UA-cam video, it's almost impossible to find something like that, please keep up with your work.
I would also love a big project like that with Typescript, too see how you manage all the types and interfaces.
Man I appreciate the time you take to bring to us this informative yet valuable content with clear explanation, His mode of delivery reveals that he is knowledgeable about the topic.
Thanks Lama Dev
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
thank you so much sir for providing quality content free of cost .
Hi Lama, thank you so much for your wonderful videos, I learned a lot and made my job easier. Also, I have a small suggestion, can you add a difficulty level to each video, like between 1-5? Because after one video, I move on to the next one, but you have so many videos that I don't know which one is right for my skill level. But if you have a difficulty level, it might be easier for me to find the next video to learn from. Hope you can think about it if you have enough time. Thanks
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@@SwarnarkaDas c'mon man don't you have some access to gpt?
Finally Completed 😊👍🏻 Thanks Sir
I am learning a lot from you. I think your first approach was right for not using ''next'' in verifyToken under verifyUser and verifyAdmin function. Because, now it will go to next outer function instead of inner function, if I understood correctly.
yes agreed!
there is the same problem which I was solving :D
can you please explain this to me? We aren't invoking the next function by adding () but it's still sending it out of the verifyUser function. How?
How it solve it? Can anyone help me?
@@hershey92 Hi bro not sure if you still need this but I had the same issue and figured it out, I think. Inside of the verifyUser function we call verifyToken, which takes 3 parameters: req, res and next. if you give it 4 parameters in the nested function it will not executed the callback function and it will go directly to the next middleware(updateUser, updateHotel etc etc). however if no cookie is in place it will have no information for req.user.admin( which is required in the body of the nested callback). anyways it is solved by checking of req.user exists.
I am just a humble intern so I think this is how it works, pls correct me if I am wrong, anyway my code works as it should.
export const verifyUser = (req,res,next) =>{
verifyToken(req,res,()=>{
if(req.user.id === req.params.id ||req.user?.isAdmin){
console.log(req.user.isAdmin)
next()
}else{
return next(createError(403, "You are not autorized"))
}
})
}
export const verifyAdmin = (req,res,next) =>{
verifyToken(req,res,()=>{
if(req.user?.isAdmin){
next()
}else{
return next(createError(403, "You are not admin autorized"))
}
})
}
By placing the question markt there it will return false if its undefined
Another awesome project Lama. You're the best.
Another great content from Lama sir, Can i expect a React-Native course from you because your explanation is superb, I would like to see a React-Native course from you sir, Thank you❤
I will love that sir
I couldn't connect to mongoDB please help me
@@amazingworld-i1h how can i help you ?
@@sohailraza2005Why m i getting like this nodemon app crashed - waiting for file changes before starting...
I would like to share this kind of content, but it's take so much time and efforts. This man deserve a medal.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
So glad you chose the MERN architecture for the project.. God bless you.. Pls can you add one last series in the video that involves email notifications or text message notification when a reservation is made for both the user and the admin.. and finally can you upload the project with a domain on a server.. I would be very grateful if any of this feature I requested above is implemented.. thank you in advance . I appreciate the impact once more...
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Keep it up, man. You are the inspiration of many developers like myself!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@Lama Dev sir please do a big project like LMS(college management system) using redux toolkit, nodejs , and reactjs MERN(technology). Your tutorial is so nice. Thank you so much for this wonderful effort
Yes! That would be so helpful. I've never seen any video with that kind of project
I am totally agree with you :)
The good thing about Lama is that you will never find errors,code is easy to understand and write ,,,keep up the good work,you have helped me alot
🇰🇪🇰🇪🇰🇪
Can you make a complete full bug tracker web app please that would be Soo helpful, we really appreciate what you're making, quality content for free 🔥.
Thank you lema, it was really helpfull for me. perhaps this is the best learning method i have seen. good job lema. i would really be glad to pay for such kind of tutorial.
Nice Job Lama! Your projects are really inspiring and has been of great help to me. I think the next tutorial should be on making "An appointment booking website using react". I already made a research on this (UA-cam & internet generally) and the ones I found are either made in WordPress or employed a plug-in. I think making this could really be helpful to take this channel to it next bigger audience as you could possibly be the first to implement it on a UA-cam channel. Merci beaucoup once again!
Yes this is a great idea. I’ve been looking for a similar project.
Are you talking like one that interacts directly with your webcam? That would be cool. I feel just making the appointments is an easy adaptation from the skills learned in this one.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
At the timestamp 3:10:33 the users table doesn't show up and gives an error of rows is undefined in console
You can fix this by adding qoutations in the useState in the DataTable.jsx on line 12 like this const [list, setList] = useState("")
I encounter this same problem but rather get xhr.js:220 GET localhost:8800/api/users 401 (Unauthorized); I tried this but where do I use the list state. Thank your for your feedback
@@amacodes7347 Hi, if you get a 401 unauthorized it probably means your user is not an admin
@@brentlombaard7573 kind of strange because if the user was not the admin then he can't access the dashboard, besides it works in Postman but on the client site it doesn't
Did you guys completed this project ?
@@surajchandramauli yes i Did
Thank you so much safak for such valuable tutorials.
Awesome stuff as usual but two quick questions:
1. Can you add payment with PayPal or stripe or flutterwave
2. Is the context api better than redux?
adding stripe payment is very easy go through their docs and just see any video that do payment through stripe in your tech stack u will get the idea
@@namansharma1448 Okay. Thank you.
bro i have a question that through admin dashboard can we add different hotels and rooms to the app?
You have helped me in moulding my MERN stack skills.And as a beginner your tutorials are awesome and simple to learn.Keep up the awesome work!
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@@SwarnarkaDas initially my local storage is undefined how to solve that problem
I am unable to remove error at 27:00 kindly help
hello bro you ynderstand
Best MERN teacher on UA-cam
Hi Lama Dev .. thank you for the time you spend in creating such useful, creative & educative content. May God Bless you Tremendously. Please, Can you do some/add some sought of notification first to the user when a reservation is made stating that "he just made a reservation" and to the admin saying that he has a new message in his dashboard. secondly, can you add features where the user has his own dashboard that helps him fast-track his reservations. Also can payment gateways be incorporated and can the project be hosted on a VPS using Nginx. thank you in advance. I really appreciate the good work. God Bless you once more.
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
@@SwarnarkaDas if you have solve this problem then can you please help me out Actually i'm also getting like this
Best EVER mern stack tutorial
At 01:13:16 once the 'next' is added to the argument, the function to check 'isAdmin' doesn't work as expected
remove next from verify token()
@@arunkumara9398 In the admin function...?
@@brianmurithi2985 did you comleted this project ?
Can anyone explain why is it happening
@@kumarsrijan7566 next in the function parameter means once completed go to the next middleware function. In this case if you add next in verifyToken function's parameter, the next will refer to the middleware after verifyToken function from the routes -- but your routes doesn't have verifyToken, but it has verifyAdmin, so ideally you want the next () -> to refer to your verifyAdmin, so that the next middleware, which in this case is updateHotel is executed.
@01:13:15 Lama said it, that the next is referring to verifyToken --> that is the catch.
So if you should add next as an parameter to verifyAdmin middleware function and not the verifyToken middleware function. Hope it helps!
This project is awesome 👍👍, looking forward for such videos in future for Inventory Management System using React and Spring Boot
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
Hi @LamaDev, Can you help me at 1:46 as per video I have passed featured=true&limit=2 in the url in thunderclient but my mongodb query returns zero results. Mongodb query not taking limit as limit field instead it is checking for featured=true and limit=2 in database which results zero result and there is no field like limit in the table.
i have a same issue
just destructure the req.params for one more value limit and use it in limit part of hotels.find function so right now we have const{min,max,...others}=req.query and change it to const{min,max,limit,...others}=req.query and in the Hotels.find function change the part "limit(req.query.limit)" to "limit(limit)"
@@sanjeevmurmu6505thank you so much for your help.
thanks bro @@sanjeevmurmu6505
Congratulations on the 100k subs💯🔥🔥🔥
For those that verifyAdmin is not working, that is happening because when we call the func verifyToken it returns a next() at the end, so it enters the route func before even initializing the verifyadmin. I hope it helps
Kaio, mesmo depois de fazer isso, recebo erro 500 dizendo que não é possível ler a propriedade "isAdmin" de undefined... consegue me ajudar?
Can you please explain further?
@@Patinhow100 I'm also having this issue, did you ever end up fixing it?
@@wtcprotoss did you solve it?
hey did you find the solution please ?
Thanks Lama. Finished it a while ago. It felt a bit rushed at the end but it was a nice tutorial.
Hi Lama, Thanks you so much for such great videos. I learned lot of things in a single vidoe and I know it will increse my cofidence in the these technologies more.
👆Send a direct message for help 🆙 ⬆️.
THANK YOU SOO MUCH. YOUR VIDEOS REALLY HELP ALOT. YOUR VIDEO REALLY UNDERSTANDABLE
Making it mobile responsive is a nightmare
Did he make it responsive?
please, more tutorials like this!!! thank u!
best teacher on youtube, with best content💯
Thank you so much Lama!
Hi Lama Dev. Thanks for your sharing knowledges to us.
Hi Lama, thanks for the tutorial. At 01:13:16, I noticed that once the 'next' is added to the argument, the function to check 'isAdmin' doesn't run anymore.
True, try removing the 'next' parameter in verifyToken inside verifyAdmin / verifyUser
@@kennedymwangi5880 Heyyy...could you please elaborate...I'm stuck here..
if (!req.user) {
return res.send('No user token is availible.');
}
i remove next and added this at the top of the function,now it seems cool..
@@jswarrior_ whats function?
Replace the both verifyAdmin and verifyUser functions with these:
export const verifyAdmin = (req, res, next) => {
verifyToken(req, res, () => {
if (req.user.isAdmin) {
next();
} else {
return next(createError(403, "You are not authorized!"));
}
});
};
export const verifyUser = (req, res, next) => {
verifyToken(req, res, () => {
if (req.user.id === req.params.id || req.user.isAdmin) {
next();
} else {
return next(createError(403, "You are not authorized!"));
}
});
};
Thank you safak for this awesome project..
Hello mate. Have problem im on part Insomnia program. when add city adress and etc. and click to test on insomnia show Cannot POST /api/hotels. Hotel.js is currect.
Hotels.js is "import express from "express"
import Hotel from "../models/Hotel.js";
const router = express.Router();
//CREATE
router.post("/api", async (req,res)=>{
const newHotel = new Hotel(req.body)
try{
const savedHotel = await newHotel.save()
res.status(200).json(savedHotel)
}catch(err){
res.status(500).json(err)
}
})
//UPDATE
//DELETE
//GET
//GET ALL
export default router"
I have same problem
I resolved it by just putting the url as :localhost:8800/hotel
@spikerrbg 22 Check your index.js file. Perhaps your endpoint is wrongly typed. It should be "/api/hotels" not "api/hotels". Also your hotels.js routes file should be '/' for the insomnia to work at 27:02
If you have probles with .limit() function just pop that "limit" key from your query and use it seperately, idk but this fixed my problem.
const { limit, ...query } = req.query;
const hotels = await Hotel.find(query).limit(limit);
Bro @LamaDev
You really deserve the massive respect.
Respect 🫡 ya 3000 !
Thank you so much, I followed this tutorial and it's very help me a lot.
hey Lama, amazing tutorial. But when I make the PropertyList component ( 1:43:02 ) , the page breaks, and I get a warning in console that data is undefined. Any ideas? anybody? EDIT: actually if I comment the map in the data for the h2 and h1, it reloads ok. EDIT2: solved with the question mark! sorry!
npm audit fix --force if it persists
i think u have to use return in map function
Solution: repalce data[i].type with data[i]?.type
Reason: optional chaining
Edit -- apologies didnt see that you got it fixed
@@RakeshSahu-cr9ks thanks anyway, dude
@@RakeshSahu-cr9ks 😅 I'm stuck here and decided to sleep, now that there's a fix i'm lazy to wake up....
your course was so useful
Please take and publish a full-stack App with React and express node and MySql database
Thanks for your efforts 🎉🎉
Thnks a lot man. We appreciate the quality content.
Thanks so much for this video. It was really helpful.
I am still waiting for this video.. Thanks sir...
Thank you Lama and also Good Luck for you,
Thanks so much sir, you are the best teacher I have met in UA-cam! We will like project on react native.
You are awesome, thank you so much for this awesome project
Noice video.
Found a little thing in the backend code where the user can update their records, here a non admin can make a put request with isAdmin=true and then can be the admin so just wanted to tell you.
PS nicee work
actually verifyAdmin and verifyUser is not working properly here.
Your projects are awesome
This course is amazing...
The way this guy goes from easy to complex should be studied.... Top Tier!
Nice tutorial. Node + Express + Mongodb + React + Material Ui
amazing work! excellent!
Thank you so so so much , as usual awsome content ❤👍👌👏🙌
REACT INSTALLATION PROBLEM FIX
if you're on Mac then you more than likely got this error "'xcrun: error: invalid active developer path.." don't worry , this is just an apple bug that hopefully will be fixed by the time you see this, But to address the issue, run "xcode-select --install" let it install on your computer. when its done, run the clone code again and you should be fine. Worked for me and hopefully works for you too.
Do you have any idea about how to fix the problem at 1:13:19?
@@hershey92 what problem exactly? I could spot a few but not sure which one you'd like help with.
@@fbaoat i solved it but thank you so much for replying!
@@hershey92 no problem!
First of all, Thanks for your support. Take love from my heart, Safak ❤️💝
I have a suggestion or request for a Management software like School, Hotel, Hospital, ERP management software. Still now I can't find any kind of MERN management software on UA-cam. Please make this one. I think everyone loves it.
Thank you so much.. you are content are amazing !!!
Thank you so much for this content. I have learned a lot from this tutorial.
I got stocked when trying to limit hotels on the featured hotel section
I am trying but it is not working on my end. can you help me?
bro i am also stuck there. ,could you please help me out?
@@shehryarabbasi7809 whats the problem
@@sushantlama2178 i am not able to limit hotels when i remove the limit parameter it works fine.
@@shehryarabbasi7809 export const getHotels = async (req, res, next) => {
const { min, max, ...other } = req.query;
try {
const hotels = await Hotel.find({
featured: other.featured,
cheapestPrice: { $gt: min | 1, $lt: max || 999 },
}).limit(req.query.limit);
res.status(200).json(hotels);
} catch (err) {
next(err);
}
};
Thank you very much bro. You are my teacher...
Hi from Peru. I like how you teach
awesome make more golden projects like this one
I liked the script at 2:36 and same was the case with me but long back.😆
The best video in the youtube!
Just finish this tutorial, still the best. .Thank you sensei..🙏
Everything worked good ? It works on your local server ?
@@skanderchouiter5384 yes so it's all good.
Hii.. I'm facing some issue can u help me out
@@firdosem8208 what are those
@rowelljayrodriguez9885 bro can u give the description of what is happening inside this project point wise....it would be very much helpful....please bro
thank you a lot for this great content
it is so impressive thank you so much
we are waiting for next project
Great Tutorial.. thank you very much
1:41:23 skeleton video- animated loading components recommend.
Its beautiful content, and i have subscribe and thanks for your time make this video.
If you keep having exporting problems with the error.js file in utils, just export default at the bottom of the file; even tho you exported at the top. It worked for me and hopefully it'll work for you too.
Comment?
don't work !!
This was a great tutorial indeed thank you lama I really think that if you may take react with Java backend will help us a lot at bigginner level maybe for a school management system that has online quiz tests or something like that
at 1:52:21 instead of fetching data on the basis of city it only fetched data only whose 'featured:false' hotels ... const { data, loading, error, reFetch } = useFetch(`/hotels?city=${destination}`).....i am getting stuck here..please help me
i,m also facing this problem@@SwarnarkaDas
Need mern project for beginner very thankfull sir ❤️
Thanks for sharing great tutorial 😃🤩
Thank you for this. 🍻
hi lama dev,
you updated hotel.js(line:15-20) file at 57.11 all of a sudden . so if you mark it on your video it will be very helpful .
you are doing great. thanks a lot.
Your work is amazing. I would like to know if I can combine part of this with a next Js project
i really appriciate your work
perfect tuto
Thank you Lama!
Thank you Lama Dev
Thanks it was great!
awsome! always thx for your effort
I love useContext with useReducer
No we don't need more applications
Now we need on top of your previous project
AWS S3 file upload
AWS ses as mail service
CI CD pipeline implementation
Docker
Nginx
AWS EC2
AWS Route 53
MERN Ecommerce with full funtionality
Thank you lama! 👏👍
👆Send a direct message for help 🆙 ⬆️.