## Deliver public assets through CDN for Hono

Cdn assets for a Hono app on Ample. Verified on Hono: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: npm install and npm run start with @hono/node-server on the node-22 template.

### Representative Queries
- Deliver public assets through CDN for Hono
- Where can I host Deliver public assets through CDN built with Hono?
- I need a public-origin configuration, versioned asset build and observable cache behavior.

### Resource Requirements
- primitive:compute
- primitive:cdn

### Infrastructure Requirements
1. **Compute**  
   Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
2. **CDN**  
   The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.

### Prerequisites
- A Hono project (npm install and npm run start with @hono/node-server on the node-22 template)
- A bucket from `ample bucket create` with credentials passed as encrypted S3_* environment variables
- An Ample account token with servers:write, buckets:read

### Workflow Steps
1. **Build and start**  
   npm install and npm run start with @hono/node-server on the node-22 template; the server must bind 0.0.0.0 on PORT.
2. **Publish a bucket for public assets**  
   Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL.  
   Command: `ample bucket publish`
3. **Verify**  
   Fetch the live URL and /p/versioned-static-assets on the example; on failure read the build and runtime logs.  
   Command: `ample logs  --kind build`

### Examples
- **Hono pattern fixture**  
  Verified CDN assets on Hono.

### Success Checks
1. **App responds on its public URL**  
   Kind: `http_get`, Path: `/`, Expect: `ample canary hono patterns`
2. **Versioned-static-assets check from the example**  
   Kind: `http_get`, Path: `/p/versioned-static-assets`, Expect: `see the pattern fixture checks`

### Limitations
- Verified on the node-22 template at s-1vcpu-1gb; other sizes and Hono major versions are not verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
- The CDN serves published-bucket objects only; cache rules, purge and TTL control are not verified.

### Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 5.0
- **Basis**: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty
- **Components**:  
  - Name: app server  
    Size: s-1vcpu-1gb  
    Quantity: 1.0  
    Monthly Amount: 5.0

**Note**: Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included.

### Evidence Summary
- **Canary Run**: Hono pattern fixture deployed on Ample (npm install and npm run start with @hono/node-server on the node-22 template); for this guide: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Observed at: 2026-09-21T01:14:18Z.

### Next Actions
1. **Browse the catalog index**  
   Action ID: `browse-catalog`, Method: `GET`
2. **Search published recipes by intent, stack and constraints**  
   Action ID: `search-recipes`, Method: `POST`, Body: `{ "limit": 5, "query": "Deliver public assets through CDN for Hono" }`
3. **Prepare a side-effect-free deployment plan for an authorized project**  
   Action ID: `plan:page:guides:hono:cdn-assets`, Method: `POST`, Body: `{ "inputs": {}, "projectId": "", "recipeId": "page:guides:hono:cdn-assets", "recipeRevision": "r1" }`
