Render is a cloud platform that can host Node.js backend apps easily.
Ensure your project has package.json with start script:
Use environment variables for secrets and ports:
Create a Git repository and push your code to GitHub, GitLab, or Bitbucket:
Go to Render Dashboard → Click New → Web Service
Connect your Git repository
Select Node environment
Set Build Command: npm install
Set Start Command: npm start
Set Environment Variables (PORT is usually automatic)
Click Create Web Service
Render will build and deploy your Express app.
Your app will have a public URL like: https://your-app.onrender.com
Render supports PostgreSQL, MySQL, and Redis
Set the database connection string in environment variables
Vercel is mainly for serverless functions, but you can deploy an Express app as an API.
Create api/index.js:
Install serverless-http:
Update package.json scripts:
Vercel will guide you through deployment
App will be deployed as serverless functions: https://your-app.vercel.app/api
Go to Project Settings → Environment Variables
Add variables like DB_URI, JWT_SECRET, etc.
Use process.env.VARIABLE_NAME in your Express app
Use environment variables for secrets
Use HTTPS (Vercel and Render provide it by default)
Keep serverless functions lightweight (for Vercel)
Use persistent storage (Render database or cloud DB)
Monitor logs and errors after deployment
| Platform | Approach | Notes |
|---|---|---|
| Render | Full backend web service | Best for full Express apps |
| Vercel | Serverless API (serverless-http) | Good for lightweight APIs and functions |
Take quizzes related to this topic and see where you stand!
Start Quiz Now