"scripts": {
"start":"node index.js",
"start-dev":"nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
{
"version": 2,
"builds": [
{
"src": "./index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/"
}
]
}
vercel
-
A question will apear that Set up and deploy ?. Type
y
means (yes). Follow the screenshot. -
Which scope do you want to deploy to? press
Enter
-
Link to existing project ? type
n
-
What’s your project’s name? (xyz-server) Press
Enter
-
In which directory is your code located? ./ Press
Enter
-
Then it takes few seconds, then you will get a production link like https://xyz-server.vercel.app/ and check in browser.
-
Then after any changing, every time you have to use this command -
vercel --prod