Appearance
Static Folders
Static folder ingress rules serve files directly from a folder in the virtual filesystem — no script execution required. Use this for HTML pages, CSS, images, JavaScript bundles, and other static assets.
How It Works
- An ingress rule with type
STATIC_FOLDERmaps a URL prefix to a folder in the virtual filesystem - When a request arrives, the engine resolves the relative path after the route prefix
- It walks the virtual filesystem tree to find the matching file
- The file is served with a
Content-Typeguessed from the filename - Directory requests serve
index.htmlautomatically
Key Differences from Script Ingress
| Aspect | HTTP Ingress | Static Folder |
|---|---|---|
scriptUUID points to | A script file | A folder tree item |
| Execution | Script runs per request | No script — file served directly |
| Content-Type | Set by Results chain | Auto-detected from filename |
| Index behavior | N/A | Serves index.html for directory URLs |
Route Mapping
Given a static folder ingress with route /site pointing to a folder containing:
/my-website/
index.html
styles.css
app.js
images/
logo.pngThe following URLs are served:
| URL | File served |
|---|---|
/backend/site | index.html |
/backend/site/ | index.html |
/backend/site/styles.css | styles.css |
/backend/site/app.js | app.js |
/backend/site/images/logo.png | images/logo.png |
The /http_root Route
The special route /http_root maps to the web server root (/). This is useful for serving a full website at the root URL:
Ingress: STATIC_FOLDER, route = /http_root
Folder: /public-website/
/public-website/index.html → http://your-host/
/public-website/about.html → http://your-host/about.html
/public-website/css/main.css → http://your-host/css/main.cssContent-Type Detection
Content types are guessed from the file extension using Java's URLConnection.guessContentTypeFromName(). Common mappings:
| Extension | Content-Type |
|---|---|
.html | text/html |
.css | text/css |
.js | application/javascript |
.json | application/json |
.png | image/png |
.jpg / .jpeg | image/jpeg |
.svg | image/svg+xml |
.pdf | application/pdf |
.txt | text/plain |
Use Cases
Single-Page Application
Serve a built SPA (React, Vue, etc.) by pointing a static folder at the build output:
/spa-app/
index.html
assets/
main.js
style.cssMarketing Site
Serve a static marketing site alongside your API endpoints:
Static folder ingress: /http_root → /marketing-site/
HTTP GET ingress: /api/contact → /ingresses/api/contact-form.jsDocumentation
Host generated documentation (e.g., from a static site generator):
Static folder ingress: /docs → /documentation/TIP
Static folders are the simplest way to serve frontend assets. They require no JavaScript handler code and are served directly from the virtual filesystem.