Module

x/aleph/server/ssr.ts>Renderer

The Full-stack Framework in Deno.
Go to Latest
class Renderer
import { Renderer } from "https://dotland.deno.dev/x/aleph@v0.3.0-alpha.29/server/ssr.ts";

The renderer class for aleph server.

Constructors

new
Renderer(app: Application)

Methods

private
lookupStyleModules(...urls: string[]): Promise<Record<string, string>>
clearCache(namespace?: string)
render404Page(url: RouterURL): Promise<string>

render custom 404 page.

renderPage(url: RouterURL, nestedModules: RouteModule[]): Promise<[string, Record<string, SSRData> | null]>

render page base the given location.

renderSPAIndexPage(): Promise<string>

render custom loading page for SPA mode.

useCache(
namespace: string,
key: string,
render: () => Promise<[string, Record<string, SSRData> | null]>,
): Promise<[string, any]>