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