Frontend Workers
Deploy and manage serverless frontend applications at the edge.
Overview
Frontend Workers allow you to deploy static frontend applications (React, Vue, Angular, plain HTML/CSS/JS) as serverless edge functions. Your frontend code runs close to users worldwide, providing fast load times and low latency.
Concepts
Frontend Worker
A serverless deployment of your frontend application. Workers serve static files and can be associated with backend apps for full-stack functionality.
Subdomain
Each worker gets a unique subdomain on the Taruvi infrastructure (e.g., my-app.workers.taruvi.cloud) or can use a custom domain.
ZIP Deployment
Frontend workers are deployed by uploading a ZIP file containing your built frontend application (HTML, CSS, JS, assets).
View Frontend Workers
- Navigate to your Site in the Dashboard.
- Click the Frontend Workers tab.
- View all deployed workers with:
- Name: Worker display name
- Subdomain: Worker URL
- Status: Active, Deploying, or Error
- Created Date: Deployment date
Deploy a Frontend Worker
- Navigate to your Site in the Dashboard.
- Click the Frontend Workers tab.
- Click Deploy Worker or Create New Worker.
- Fill in the deployment details:
- Worker Name: A descriptive name for your worker
- Custom Subdomain: Optional custom subdomain (auto-generated if blank)
- Associated App: Optional link to a backend app
- Domain Configuration: Use internal or custom domain
- Upload your ZIP file:
- Drag and drop your ZIP file, or click to browse
- Maximum file size: 10MB
- Must contain built frontend assets
- Click Deploy Worker.
Build your frontend project before deployment:
- React:
npm run build - Vue:
npm run build - Angular:
ng build
Then ZIP the contents of the build/dist folder.
ZIP File Requirements
Your ZIP file should contain:
- index.html: Required entry point
- Static assets: CSS, JavaScript, images, fonts
- Built output: Production-ready compiled code
Example Structure
my-app.zip
├── index.html
├── assets/
│ ├── main.js
│ ├── style.css
│ └── images/
│ └── logo.png
└── favicon.ico
Domain Configuration
Internal Domain (Default)
Workers are automatically assigned a subdomain:
- Format:
{subdomain}.workers.taruvi.cloud - SSL certificate included automatically
Custom Domain
Use your own domain for the worker:
- Select Custom Domain in the deployment dialog.
- Enter your domain (e.g.,
app.yourcompany.com). - Configure DNS:
- Add a CNAME record pointing to
workers.taruvi.cloud - Or add an A record to the provided IP
- Add a CNAME record pointing to
- Wait for SSL certificate provisioning (automatic).
View Worker Details
- Click on a worker in the list.
- View deployment details:
- URL: The worker's public URL
- Status: Current deployment status
- Associated App: Linked backend app (if any)
- Created/Updated: Timestamps
Update a Worker
Redeploy with New Files
- Click the Edit icon on the worker.
- Upload a new ZIP file with updated content.
- Click Deploy.
Update Configuration
- Click the Edit icon on the worker.
- Update configuration settings.
- Click Save Changes.
Delete a Worker
- Click the Delete (trash) icon on the worker.
- Confirm deletion in the dialog.
Deleting a worker immediately takes it offline. Any URLs pointing to this worker will stop working.
Configuration
Worker Fields
| Field | Description | Required |
|---|---|---|
| Name | Display name | Yes |
| Subdomain | Custom subdomain | No |
| Associated App | Backend app link | No |
| Domain | Custom domain | No |
| Is Internal | Use internal domain | Yes |
File Upload Limits
| Limit | Value |
|---|---|
| Maximum file size | 10 MB |
| Allowed file types | .zip only |
Best Practices
- Optimize your build: Minify and compress assets before deployment
- Use asset hashing: Enable cache busting for updated files
- Test locally first: Verify your build works before deploying
- Use environment variables: Configure API endpoints through environment settings
- Monitor performance: Check worker analytics for load times
Limits
| Resource | Limit |
|---|---|
| Frontend workers per site | 50 |
| ZIP file size | 10 MB |
| Custom domains per worker | 1 |
Need higher limits? Contact support to discuss your requirements.
Troubleshooting
Worker shows error status
Problem: Worker deployment failed or shows error status.
Solution:
- Check that your ZIP file contains a valid index.html.
- Verify the ZIP file is under 10MB.
- Ensure assets are correctly referenced (relative paths).
- Check for build errors in your frontend project.
Custom domain not working
Problem: Custom domain returns an error or doesn't load.
Solution:
- Verify DNS records are correctly configured.
- Wait for DNS propagation (up to 48 hours).
- Check SSL certificate status in worker details.
- Ensure the domain doesn't have conflicting records.
Assets not loading
Problem: CSS, JS, or images return 404 errors.
Solution:
- Verify all assets are included in the ZIP file.
- Check that paths in your HTML are relative, not absolute.
- Ensure the build process copied all required files.
Related
Last Updated: January 2025