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!
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
../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'))))
Render Support, UTC+10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.