Multi-Runtime Deployment
Deploy your MoroJS applications to any platform with a single command. From edge functions to traditional servers, choose the deployment target that fits your needs.
Quick Deployment
Auto-Detection
1npx @morojs/cli deployAutomatically detects the best deployment target based on your project configuration.
Specific Platform
1npx @morojs/cli deploy vercel --domain=myapi.vercel.appDeploy to a specific platform with custom configuration options.
Deployment Targets
Vercel Edge
Deploy to Vercel Edge Runtime with global distribution
Best For:
APIs, websites, edge functions
Pricing:
Free tier available
Features:
1npx @morojs/cli deploy vercelAWS Lambda
Serverless functions with auto-scaling on AWS
Best For:
Event-driven APIs, microservices
Pricing:
Pay per invocation
Features:
1npx @morojs/cli deploy lambdaCloudflare Workers
Edge workers with V8 isolates and global network
Best For:
Edge APIs, global applications
Pricing:
Free tier included
Features:
1npx @morojs/cli deploy workersDocker Container
Containerized deployment for any platform
Best For:
Traditional hosting, Kubernetes
Pricing:
Infrastructure dependent
Features:
1npx @morojs/cli deploy dockerDeployment Process
Build
Optimize code for target runtime
Package
Bundle dependencies and assets
Deploy
Upload to selected platform
Configure
Set up domains and environment
Advanced Configuration
Environment Variables
1# Set environment variables for deployment
2npx @morojs/cli deploy vercel \
3 --env NODE_ENV=production \
4 --env DATABASE_URL=postgresql://... \
5 --env JWT_SECRET=your-secret-key
6
7# Use environment file
8npx @morojs/cli deploy lambda --env-file=.env.productionCustom Domains
1# Vercel with custom domain
2npx @morojs/cli deploy vercel --domain=api.mycompany.com
3
4# Lambda with API Gateway custom domain
5npx @morojs/cli deploy lambda --domain=api.mycompany.com --certificate-arn=arn:aws:acm:...
6
7# Cloudflare Workers with custom domain
8npx @morojs/cli deploy workers --domain=api.mycompany.com --zone-id=your-zone-idResource Configuration
1# Lambda with custom memory and timeout
2npx @morojs/cli deploy lambda \
3 --memory=1024 \
4 --timeout=30 \
5 --region=us-west-2
6
7# Workers with KV storage
8npx @morojs/cli deploy workers \
9 --kv-namespace=my-data \
10 --compatibility-date=2023-10-01
11
12# Docker with resource limits
13npx @morojs/cli deploy docker \
14 --memory=512m \
15 --cpus=0.5 \
16 --port=8080Post-Deployment
Monitor Performance
- • View deployment logs
- • Monitor response times
- • Track error rates
- • Analyze usage metrics
Manage Deployments
- • Update environment variables
- • Roll back deployments
- • Scale resources
- • Configure alerts
CI/CD Integration
- • GitHub Actions workflows
- • GitLab CI/CD pipelines
- • Automated testing
- • Preview deployments