Next.js Discord

Discord Forum

My page is deployed, but there it is 404

Answered
chr.yx posted this in #help-forum
Open in Discord
Answered by joulev
If you want to have your backend in the same place as your frontend, use route handlers/api routes in nextjs instead of making a standalone backend app
View full answer

10 Replies

@chr.yx Click to see attachment
change the framework preset to Next.js, leave all of those items including output directory as default, set this "root directory" to frontend
@chr.yx how would i get the api requests from backend?
Deploy backend to a separate project
Separate domain
Add cors headers
If you want to have your backend in the same place as your frontend, use route handlers/api routes in nextjs instead of making a standalone backend app
Answer
@joulev Deploy backend to a separate project
what should i change for if it is only backend
@chr.yx what should i change for if it is only backend
I don’t know what your backend is, I don’t know. Chances are your backend is not even deployable on Vercel