Blog

Vercel

Express

Node

Setup

Deploy Node To Vercel

Deploy Node / Express To Vercel

Ragav Kumar V

Ragav Kumar V

Jan 6, 2023 — Updated Jan 7, 2023 · 2 min read

Since Heroku has stopped with free tier vercel has become the goto for deploying your backend.

In your Node app make sure vercel.json is present in root of your node project.


_14
{
_14
"builds": [
_14
{
_14
"src": "./index.js",
_14
"use": "@vercel/node"
_14
}
_14
],
_14
"routes": [
_14
{
_14
"src": "/(.*)",
_14
"dest": "/index.js"
_14
}
_14
]
_14
}

Sign in to https://vercel.com/login

Choose GitHub to import your repositories
Choose GitHub to import your repositories
Search your project name & click on import to connect to your desired repo
Search your project name & click on import to connect to your desired repo
Click on Environments Variables and provide your secrets
Click on Environments Variables and provide your secrets
Fill your secret value & Click on Add
Fill your secret value & Click on Add
Click on Deploy
Click on Deploy
Takes about 20s for the first deploy and it is faster in subsequent ones
Takes about 20s for the first deploy and it is faster in subsequent ones
Click on Continue to Dashboard
Click on Continue to Dashboard
Click on Vist to get your deployed Node URL
Click on Vist to get your deployed Node URL

@ragavkumarv
swipe to next ➡️