Skip to main content

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

  1. Navigate to your Site in the Dashboard.
  2. Click the Frontend Workers tab.
  3. 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

  1. Navigate to your Site in the Dashboard.
  2. Click the Frontend Workers tab.
  3. Click Deploy Worker or Create New Worker.
  4. 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
  5. Upload your ZIP file:
    • Drag and drop your ZIP file, or click to browse
    • Maximum file size: 10MB
    • Must contain built frontend assets
  6. Click Deploy Worker.
tip

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:

  1. index.html: Required entry point
  2. Static assets: CSS, JavaScript, images, fonts
  3. 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:

  1. Select Custom Domain in the deployment dialog.
  2. Enter your domain (e.g., app.yourcompany.com).
  3. Configure DNS:
    • Add a CNAME record pointing to workers.taruvi.cloud
    • Or add an A record to the provided IP
  4. Wait for SSL certificate provisioning (automatic).

View Worker Details

  1. Click on a worker in the list.
  2. 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

  1. Click the Edit icon on the worker.
  2. Upload a new ZIP file with updated content.
  3. Click Deploy.

Update Configuration

  1. Click the Edit icon on the worker.
  2. Update configuration settings.
  3. Click Save Changes.

Delete a Worker

  1. Click the Delete (trash) icon on the worker.
  2. Confirm deletion in the dialog.
warning

Deleting a worker immediately takes it offline. Any URLs pointing to this worker will stop working.


Configuration

Worker Fields

FieldDescriptionRequired
NameDisplay nameYes
SubdomainCustom subdomainNo
Associated AppBackend app linkNo
DomainCustom domainNo
Is InternalUse internal domainYes

File Upload Limits

LimitValue
Maximum file size10 MB
Allowed file types.zip only

Best Practices

  1. Optimize your build: Minify and compress assets before deployment
  2. Use asset hashing: Enable cache busting for updated files
  3. Test locally first: Verify your build works before deploying
  4. Use environment variables: Configure API endpoints through environment settings
  5. Monitor performance: Check worker analytics for load times

Limits

ResourceLimit
Frontend workers per site50
ZIP file size10 MB
Custom domains per worker1
info

Need higher limits? Contact support to discuss your requirements.


Troubleshooting

Worker shows error status

Problem: Worker deployment failed or shows error status.

Solution:

  1. Check that your ZIP file contains a valid index.html.
  2. Verify the ZIP file is under 10MB.
  3. Ensure assets are correctly referenced (relative paths).
  4. Check for build errors in your frontend project.

Custom domain not working

Problem: Custom domain returns an error or doesn't load.

Solution:

  1. Verify DNS records are correctly configured.
  2. Wait for DNS propagation (up to 48 hours).
  3. Check SSL certificate status in worker details.
  4. Ensure the domain doesn't have conflicting records.

Assets not loading

Problem: CSS, JS, or images return 404 errors.

Solution:

  1. Verify all assets are included in the ZIP file.
  2. Check that paths in your HTML are relative, not absolute.
  3. Ensure the build process copied all required files.

Last Updated: January 2025