-
-
Couldn't load subscription status.
- Fork 170
Open
Description
Brief overview
A RESTHeart plugin that enables server-side rendering of HTML pages by fetching data resources (such as MongoDB documents) and applying template transformations to generate dynamic HTML responses.
Rationale
Modern web applications often require server-side rendering for improved SEO, faster initial page loads, and enhanced accessibility. This plugin bridges RESTHeart's data layer with presentation logic, allowing developers to:
- Serve dynamic HTML content directly from MongoDB data
- Support multiple templating engines (Mustache, Handlebars, Thymeleaf, etc.)
- Maintain separation between data and presentation
- Reduce client-side complexity for content-driven pages
Detailed documentation
Overview
The Template Rendering Plugin intercepts GET requests to designated endpoints and transforms JSON data into HTML using configurable template engines.
How it works
- Client sends GET request to a resource endpoint
- Plugin retrieves the requested document(s) from MongoDB
- Data is passed to the specified template engine
- Template is rendered with the data as context
- Generated HTML is returned to the client
TBD