-
Summaryi get this error in logs GET /Index.js backend code Index.js const express = require('express'); // setting up middleware // importing model const ConnectionString = "mongodb+srv://djosh734:.mongodb.net/ListAppDB"; mongoose.connect(ConnectionString).then(() => { const port = process.env.PORT || 3000; }) // CRUD Operations app.get('/', (req, res) => { // Get Method // Create Method PostMethod app.post("/lists", async (req, res) => { } catch (error) { }); //delete Method app.delete("/lists/:id", async (req, res) => { } catch (error) { }); // put Method app.put("/lists/:id", async (req, res) => { } catch (error) { module.exports = app; ///// vercel.json file { ExampleNo response Steps to Reproduceon deployment |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Hi, @ApexSQ! Here are the main issues I see from the output above:
Let us know how you get on! |
Beta Was this translation helpful? Give feedback.
-
|
Because my backend was Named Index.js with a capital I i need to specify the path as shown below { "version": 2, } |
Beta Was this translation helpful? Give feedback.
-
|
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
Because my backend was Named Index.js with a capital I i need to specify the path as shown below
{
"version": 2,
"builds": [{ "src": ".js", "use": "@vercel/node" }],
"routes": [
{ "src": "/.", "dest": "/Index.js" }
]
}