Render templates on the server
parent
fcac8e4755
commit
d71c63a3a3
|
@ -2,6 +2,7 @@ name: template
|
||||||
functions:
|
functions:
|
||||||
# API
|
# API
|
||||||
renderTemplate:
|
renderTemplate:
|
||||||
|
env: server
|
||||||
path: api.ts:renderTemplate
|
path: api.ts:renderTemplate
|
||||||
|
|
||||||
cleanTemplate:
|
cleanTemplate:
|
||||||
|
|
|
@ -73,11 +73,6 @@ export class ServerSystem {
|
||||||
|
|
||||||
// Always needs to be invoked right after construction
|
// Always needs to be invoked right after construction
|
||||||
async init(awaitIndex = false) {
|
async init(awaitIndex = false) {
|
||||||
this.ds = new DataStore(
|
|
||||||
this.kvPrimitives,
|
|
||||||
buildQueryFunctions(this.allKnownPages, this.system),
|
|
||||||
);
|
|
||||||
|
|
||||||
this.system = new System(
|
this.system = new System(
|
||||||
"server",
|
"server",
|
||||||
{
|
{
|
||||||
|
@ -89,6 +84,11 @@ export class ServerSystem {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.ds = new DataStore(
|
||||||
|
this.kvPrimitives,
|
||||||
|
buildQueryFunctions(this.allKnownPages, this.system),
|
||||||
|
);
|
||||||
|
|
||||||
// Event hook
|
// Event hook
|
||||||
const eventHook = new EventHook();
|
const eventHook = new EventHook();
|
||||||
this.system.addHook(eventHook);
|
this.system.addHook(eventHook);
|
||||||
|
|
Loading…
Reference in New Issue