How It Works
Static website hosting in Suga combines two resources:- Bucket - Stores your static files (HTML, CSS, JavaScript, images)
- Entrypoint - Routes traffic to the bucket through a CDN
Basic static site
- Files from
./buildare uploaded to the bucket - The entrypoint (CDN) serves files from the bucket
- Users access your site via HTTPS with automatic SSL
Single Page Applications (SPAs)
Deploy React, Vue, Angular, or Svelte applications:suga.yaml
Static Site + API
Most applications need both frontend and backend. Route different paths to different destinations:Frontend + Backend
https://yoursite.com/→ Static files from buckethttps://yoursite.com/about→ Static files from buckethttps://yoursite.com/api/users→ API servicehttps://yoursite.com/api/products→ API service
Multi-Page Applications
Deploy traditional multi-page websites:Build Process Integration
Integrate with your existing build tools:React (Create React App / Vite)
Vue.js
Angular
Next.js (Static Export)
package.json
Svelte/SvelteKit
Custom Domains
Most platforms support custom domains through Terraform variables:- AWS
- GCP
After running Then apply:
suga build, configure your domain:terraform/stacks/my-app/terraform.tfvars
AWS requires ACM certificates in
us-east-1 for CloudFront. Create your certificate in ACM first.Environment Variables in Frontend
Frontend applications often need runtime configuration (API URLs, feature flags, etc.):Build-time Variables
suga.yaml
.env.production
Local Development
Duringsuga dev:
- Buckets are emulated in
.suga/buckets/ - Static files are served from the local filesystem
- Changes to files in
content_pathrequire rebuild and re-upload in production
Local Development Guide
Learn more about local development workflow