Hellow everybody,
I have deployed a Mern-stack application, the deploy seems successful but I get an error saying " Cannot GET / ". Link to the=> website https://friendnet.onrender.com/ link of my repo => GitHub - premj21/MERN_SOCIAL_MEDIA . I would really appreciate any help thank you!
Hi there,
The issue is here: https://github.com/premj21/MERN_SOCIAL_MEDIA/blob/master/server/server.js#L18. ../
will be relative to the current working directory, not relative to where server.js
is. ../client/build
doesn’t exist, which is why you get the Cannot GET /
(a 404 response). Try using app.use("/", express.static(path.join(__dirname, '../client/assets'))))
Regards,
Keith
Render Support, UTC+10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.