Download apps/vis/server/src/lib/web-asset.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/server/src/lib/web-asset.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vis/server/src/lib/web-asset.ts
-
curl -L -o web-asset.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/server/src/lib/web-asset.ts
598 Bytes
| /** A pre-gzipped self-contained SPA HTML page, served from memory. */ | |
| export interface WebAsset { | |
| /** gzip-compressed bytes of the single-file index.html. */ | |
| readonly gzipped: Uint8Array; | |
| } | |
| /** Serve the embedded SPA for any non-/api GET (SPA fallback: same page for | |
| * every client route, since the bundle is a single self-contained HTML). */ | |
| export function serveWebAsset(asset: WebAsset): Response { | |
| return new Response(asset.gzipped, { | |
| headers: { | |
| 'content-type': 'text/html; charset=utf-8', | |
| 'content-encoding': 'gzip', | |
| 'cache-control': 'no-store', | |
| }, | |
| }); | |
| } | |