add day 29

This commit is contained in:
Zoe
2022-10-21 23:14:34 -05:00
parent b60a398627
commit 11912b17dd
37 changed files with 10393 additions and 0 deletions

15
day29/src/entry-server.ts Normal file
View File

@@ -0,0 +1,15 @@
import { compileToString } from './lib/templateRenderer';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { appState } from './main';
let ctx = {};
export function SSRPage(template: string) {
return compileToString(template);
}
export function setContext(context: Record<string, unknown>) {
ctx = context;
}
export function getContext() {
return ctx;
}