Custom app launcher, browser home page, and service monitor. cute.haus
homelab react typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

fix dist

Aly Raffauf (May 7, 2026, 9:01 PM EDT) 74ea7e4d 497ffaf8

+13 -3
+1
Containerfile
··· 3 3 COPY package.json bun.lock ./ 4 4 RUN bun install --frozen-lockfile 5 5 COPY . . 6 + RUN bun run build 6 7 ENV NODE_ENV=production 7 8 EXPOSE 3000 8 9 CMD ["bun", "run", "src/index.ts"]
+12 -3
src/index.ts
··· 1 1 import { serve } from "bun"; 2 - import index from "./index.html"; 2 + import { join } from "path"; 3 3 import { privateApps } from "./data/privateApps"; 4 4 import { websites } from "./data/websites"; 5 + 6 + const distDir = join(import.meta.dir, "..", "dist"); 5 7 6 8 let hnCache: { stories: any[]; fetchedAt: number } | null = null; 7 9 let lobstersCache: { stories: any[]; fetchedAt: number } | null = null; ··· 112 114 hostname: "0.0.0.0", 113 115 port: 3000, 114 116 routes: { 115 - // Serve index.html for all unmatched routes. 116 - "/*": index, 117 + // Serve static assets from dist/, with index.html fallback for SPA routes. 118 + "/*": async (req) => { 119 + const url = new URL(req.url); 120 + const candidate = Bun.file( 121 + join(distDir, url.pathname === "/" ? "index.html" : url.pathname), 122 + ); 123 + if (await candidate.exists()) return new Response(candidate); 124 + return new Response(Bun.file(join(distDir, "index.html"))); 125 + }, 117 126 118 127 "/api/check": { 119 128 async POST(req) {