add day 48 & 49 (smh)

This commit is contained in:
Zoe
2022-11-10 21:23:25 -06:00
parent 9d955e014b
commit 4ed008a755
90 changed files with 23101 additions and 0 deletions

17
day49/src/entry-server.ts Normal file
View File

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