Sanaullah Ansari
Sanaullah Ansari

Reputation: 1

404 Not found error on vercel nodejs deployment

I am trying to host my nodejs backend on vercel, I am getting 404 Not Found when I make an api call. here's my vercel.json file:

{
  "version": 2,
  "builds": [
    { "src": "backend/server/**/*.ts", "use": "@vercel/node" }
  ],
  "routes": [
    { "src": "/(.*)", "dest": "/dist/server.js" }
  ]
}

my backend folder is along with the create-react app, inside it has a folder named server inside which I have a server.ts file which is the main entry point of the application and the other folders like controller and all are under server folder only. how to tackle it

I am trying to host it but getting 404 it should be hosted properly

Upvotes: 0

Views: 73

Answers (0)

Related Questions