- Create a free Vercel hobbiest account.
- Add
vercel.json
file to the root of your project and fill with the following. Replaceindex.js
with your server file name;
{
"version": 2,
"builds": [
{
"src": "index.js",
"use": "@now/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "index.js"
}
]
}
-
Upload your project to a GitHub repository.
-
Goto Vercel account create a new project.
-
Choose the repository that you want to run as a backend service.
-
Follow the instructions.
-
After the project deployed do not forget to update the endpoint address in your project.