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

Automatic platform detection

bash

1morojs-cli deploy

Automatically detects the best deployment target based on your project configuration.

Specific Platform

Target specific platform

bash

1morojs-cli deploy vercel --domain=myapi.vercel.app

Deploy 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:

Global edge network
Instant deployments
Automatic scaling
Zero configuration
Custom domains
Environment variables

Deploy command

bash

1morojs-cli deploy vercel

AWS Lambda

Serverless functions with auto-scaling on AWS

Best For:

Event-driven APIs, microservices

Pricing:

Pay per invocation

Features:

Auto-scaling
Pay per request
AWS integration
Event triggers
VPC support
Custom memory/timeout

Deploy command

bash

1morojs-cli deploy lambda

Cloudflare Workers

Edge workers with V8 isolates and global network

Best For:

Edge APIs, global applications

Pricing:

Free tier included

Features:

V8 isolates
Edge computing
KV storage
Global network
Instant cold starts
WebAssembly support

Deploy command

bash

1morojs-cli deploy workers

Docker Container

Containerized deployment for any platform

Best For:

Traditional hosting, Kubernetes

Pricing:

Infrastructure dependent

Features:

Platform agnostic
Consistent environments
Kubernetes ready
Local development
CI/CD integration
Resource control

Deploy command

bash

1morojs-cli deploy docker

Deployment Process

🔨
1

Build

Optimize code for target runtime

📦
2

Package

Bundle dependencies and assets

🚀
3

Deploy

Upload to selected platform

⚙️
4

Configure

Set up domains and environment

Advanced Configuration

Environment Variables

Configure environment variables

bash

1# Set environment variables for deployment
2morojs-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
8morojs-cli deploy lambda --env-file=.env.production

Custom Domains

Configure custom domains

bash

1# Vercel with custom domain
2morojs-cli deploy vercel --domain=api.mycompany.com
3
4# Lambda with API Gateway custom domain
5morojs-cli deploy lambda --domain=api.mycompany.com --certificate-arn=arn:aws:acm:...
6
7# Cloudflare Workers with custom domain
8morojs-cli deploy workers --domain=api.mycompany.com --zone-id=your-zone-id

Resource Configuration

Configure resources

bash

1# Lambda with custom memory and timeout
2morojs-cli deploy lambda \
3  --memory=1024 \
4  --timeout=30 \
5  --region=us-west-2
6
7# Workers with KV storage
8morojs-cli deploy workers \
9  --kv-namespace=my-data \
10  --compatibility-date=2023-10-01
11
12# Docker with resource limits
13morojs-cli deploy docker \
14  --memory=512m \
15  --cpus=0.5 \
16  --port=8080

Post-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

Platform-Specific Guides