Deployment Basics
- Deployment moves a Node.js application from development to production and ensures it runs smoothly for end users.
What is Deployment?
Deployment is the process of moving your application from local machine to a live server so users can access it over the internet.
Deployment Steps (High Level)
Build App
↓
Upload Code
↓
Install Dependencies
↓
Set Environment Variables
↓
Start Server
Deployment Goal
Application runs 24/7
Accessible via public URL
Connected to production database
Deploying Node.js App
Typical Platforms
Render
Railway
Vercel (Backend)
AWS / DigitalOcean
Basic Requirements
package.json
start script
Environment variables
Production database
Deployment Flow
GitHub Repo → Hosting Platform → Live App
- 🔹 Common Deployment Errors
Frequent Issues
Missing environment variables
Wrong PORT configuration
App crashes due to memory limits
Database connection failures
Example Error
Error: listen EADDRINUSE
Cause: Port already in use.