Node.js Social Media REST API with MongoDb

Node.js Social Media REST API with MongoDb

Lama Dev

3 года назад

374,967 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

R V G
R V G - 17.11.2023 10:49

I don't know why but the 'get timeline post' api is not working. I have completed the frontend a too. But now i am stuck in fetching the timeline posts.

Ответить
Aneeb Rehman
Aneeb Rehman - 13.11.2023 17:41

Great Video. Just done with the backend part. Obviously you will face errors but remember one thing those errors will make you learn most of the things.

Ответить
Eduardo Rojas
Eduardo Rojas - 08.11.2023 06:48

I followed this project, and was going pretty good until the last query where it is for the timeline, but I am not sure why is not working, like I literally have everything the same and it does not work, on postman always returns an empty array and I am not sure why that is happening, I do not if I am the only one on that, I would like to know if someone had the same problem as me :)

Ответить
Can İnan
Can İnan - 29.10.2023 10:02

Teşekkürler harika bir api dersiydi.

Ответить
Faiq Raza
Faiq Raza - 27.10.2023 08:20

why are you not explaining all the steps taken

Ответить
Akseer Ahmad
Akseer Ahmad - 20.10.2023 19:43

unable to see the profile or coverprofile in my cluster or response, can someone help me with this

Ответить
WAR NEWS
WAR NEWS - 28.09.2023 11:33

You helped me a lot. Lafe saver...

Ответить
Bharti Patel
Bharti Patel - 09.09.2023 21:35

I followed what you did for getting timeline of user but I am getting 500 Internal server error
// get timeline of post
router.get("/timeline/all", async (req, res)=>{
let postArray = [];
try{
const currentUser = await User.findById(req.body.userId);
const userPosts = await Post.findById({userId: currentUser._id});
const friendPosts = await Promise.all(
currentUser.followings.map((friendId)=>{
return Post.find({userId: friendId});
})
);
res.json(userPosts.concat(...friendPosts));
}catch(err){
console.log(err);
res.status(500).json(err);
}
});
can anyone plz help me to figureout the mistake ?

Ответить
Catu Hardoy
Catu Hardoy - 29.08.2023 21:49

hey everyone! this tutorial is great I love Lamadev. Did someone had trouble creating more than one post from the same user? once I want to add a second post I receive a 500 err.:(

Ответить
bablu pandit
bablu pandit - 29.08.2023 20:52

you are the best .

Ответить
М.О.О.
М.О.О. - 08.08.2023 14:38

I enjoed it. This lesson more clarify than about firebase. Thank You!

Ответить
kaushal shinde
kaushal shinde - 05.08.2023 17:57

i didnt understand the Nested Asynchronous Fetch code...can any body explain

Ответить
Harun Yeni
Harun Yeni - 20.07.2023 13:45

Thanks for your video. I wanted to do similar to your project, but i didn't know from where i need to start. After you watched your video, i know what i need to do exactly. Thanks again.

Ответить
PEACE
PEACE - 30.06.2023 04:20

Extremely good course. I am so lucky to find this. Thank you for your effort!!!!!👍👍👍

Ответить
MrAlejom182
MrAlejom182 - 19.05.2023 23:05

Thank you! This is awesome

Ответить
Mostafa Ahmed
Mostafa Ahmed - 08.05.2023 18:02

in get timeline end point I think posts in the array will be sorted by friends name so each friend posts will be consecutive , if I want to make them random or sorted by publish date I may shuffle the array or sort it based on the created date is that a good solution in case of performance

Ответить
Amey masal
Amey masal - 03.05.2023 23:02

I had this error but now i have solved it
"MongoAPIError: URI must include hostname, domain name, and tld"

This error was coming because of "@" in password, use ASCII code for @ then your problem will be solved.
If you have used any other special character in password then replace it with its ASCII code.
For "@" it is "%40"

Ответить
Raghumathi Sridhar
Raghumathi Sridhar - 25.04.2023 17:59

If I change that into mongourl my app crashes😢😢

Ответить
Raghumathi Sridhar
Raghumathi Sridhar - 25.04.2023 17:57

I have issues in (mongoose.connect) 07.30 plsn tell me

Ответить
Oscar Anillo
Oscar Anillo - 20.04.2023 03:02

Thanks for sharing! This is amazing!

Ответить
blender CGI art
blender CGI art - 10.04.2023 13:52

Great effort

Ответить
KalTube
KalTube - 05.04.2023 16:33

Well Done!❤❤

Ответить
Bonyy_
Bonyy_ - 05.04.2023 10:34

no matter what i do i keep getting internal server error (500) on timeline posts only .......... i have added the user model and also tried making a new cluster

Ответить
Erkin Abdullaev
Erkin Abdullaev - 19.03.2023 09:32

I am excited from learning this video Thank you!!!!

Ответить
pratyush pandey
pratyush pandey - 18.03.2023 17:45

sir, u are too much amazing with ur frontend and backend skill even low iq person like me can understand everything. Please keep up this novel work going and i will always pray for ur better life. i am student so i cannot do much more than that.

Ответить
Samir Roy fitness
Samir Roy fitness - 14.03.2023 22:56

const err = new mongooseerror(message); ^ mongooseerror: operation `users.insertone()` buffering timed out after 10000ms at timeout My god, this problem is occurred how to solve this problem.please everyone help me

Ответить
Samir Roy fitness
Samir Roy fitness - 13.03.2023 18:22

[nodemon] app crashed - waiting for file changes before starting... my code,this problem is occurred how to solve this problem please lama

Ответить
Siddhesh Patil
Siddhesh Patil - 13.03.2023 11:31

Can someone help with what are prerequisites for this backend part? I have completed the front end for this project with react.

Ответить
UKMAMA Vlogs
UKMAMA Vlogs - 02.03.2023 11:04

MongooseError: Mongoose.prototype.connect() no longer accepts a callback

Ответить
Deepak Singh
Deepak Singh - 27.02.2023 03:28

Hi I am not able to get the timeline, I am getting blank in postman

Ответить
Koushik Yenugula
Koushik Yenugula - 21.02.2023 19:50

Hi All,

Anyone of you came across this error? I have been trying to fix this for awhile. Can anyone please help me fix this below error.

MongooseError: Operation 'users.insertone()' buffering timed out after 1000ms

Ответить
Phải xem cái này
Phải xem cái này - 18.02.2023 09:48

I think you should put part 1 or part 2 in each video to make a video list

Ответить
Ragish Tandukar
Ragish Tandukar - 16.02.2023 01:07

Its a very good tutorial. However, I have one confusion. I have been learning react for the last few months. And I am not getting why do we have to create so many action in the backend for likes, dislikes, post and so on. Can't we do it react in the client-side. I know its better to do these stuffs in back-end. But if it is not good to do in client-side, then what is the use of useState, useHooks and other powerful library in react. I am just keen what might be the reason except security concerns. Any help regarding this would be appreciated.

Ответить
Sajan Acharya
Sajan Acharya - 15.02.2023 12:03

Mern Hero 🔥🔥

Ответить
adiaba jacob
adiaba jacob - 31.01.2023 18:52

who is getting this error SyntaxError: Unexpected token " in JSON at position 0

Ответить
Elue Wisdom
Elue Wisdom - 27.01.2023 01:31

do your next set of projects with typescript

Ответить
Himaya Perera
Himaya Perera - 11.01.2023 11:30

How to find the port no. Please help me

Ответить
Vivek Chatterjee
Vivek Chatterjee - 07.01.2023 16:57

Anyone who is getting 500 internal server error for all requests or any type of mongoose error, try deleting the cluster in Mongodb and creating another one and using that cluster's link in env file. I was stuck for hours, but eventually found about this.

Ответить
Arhis Alight
Arhis Alight - 06.01.2023 18:28

Thank you very much! Done with the pleasure!

Ответить
Beinerth Chitiva Machado
Beinerth Chitiva Machado - 05.01.2023 05:44

Lama Dev, you're THE GOAT!!!

Ответить