Next.js Discord

Discord Forum

404: NOT_FOUND

Answered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
I am trying to deploy my express sever on vercel , but getting the same code as my index.js file on production
How to solve it
My vercel.json file is like that {
"version": 2,
"builds": [
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/index.js"
}
]
}
Answered by West African Lion
Typing mistake vercen.json
View full answer

6 Replies

also vercel is serverless, so the app will behave very differently compared to a local express server
so you should use a long-running server like railway, fly.io, render or digitalocean to host this app instead
vercel is suitable for serverless-compatible frameworks only, express is not one of them
West African LionOP
Typing mistake vercen.json
Answer