Skip to main content

Overview

TrailBase’s WASM runtime enables server-side rendering (SSR) of HTML pages. You can generate dynamic content, use template engines, and serve complete web pages directly from your WASM components.

Basic HTML Response

Dynamic Content from Database

Query the database and render results:

Templating

Manual String Templating

Component-Based Rendering

Lists and Tables

Render database results as HTML tables:

Forms and POST Handling

Handle form submissions:

Pagination

Error Pages

Integrating with Frontend Frameworks

Serving SPA with API

Performance Tips

Caching: Consider implementing response caching for frequently accessed pages:

Next Steps

Custom Endpoints

Build JSON APIs

Vector Search

Add semantic search

Jobs Scheduler

Background processing

Email

Send transactional emails