Render templates on the server

pull/679/head
Zef Hemel 2024-02-04 15:32:14 +01:00
parent fcac8e4755
commit d71c63a3a3
2 changed files with 6 additions and 5 deletions

View File

@ -2,6 +2,7 @@ name: template
functions:
# API
renderTemplate:
env: server
path: api.ts:renderTemplate
cleanTemplate:

View File

@ -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);