AppView in a box as a Vite plugin thing hatk.dev
2
fork

Configure Feed

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

add node memory stats to admin endpoint and set memory limit in Dockerfile

- Expose rss/heapUsed/heapTotal/external in /admin/stats response
- Add --max-old-space-size=256 to Dockerfile CMD template
- Bump version to 0.0.1-alpha.5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+10 -3
+1 -1
packages/hatk/package.json
··· 1 1 { 2 2 "name": "@hatk/hatk", 3 - "version": "0.0.1-alpha.4", 3 + "version": "0.0.1-alpha.5", 4 4 "bin": { 5 5 "hatk": "dist/cli.js" 6 6 },
+1 -1
packages/hatk/src/cli.ts
··· 922 922 RUN node_modules/.bin/hatk build 923 923 RUN npm prune --omit=dev 924 924 EXPOSE 3000 925 - CMD ["node", "node_modules/@hatk/hatk/dist/main.js", "config.yaml"] 925 + CMD ["node", "--max-old-space-size=256", "node_modules/@hatk/hatk/dist/main.js", "config.yaml"] 926 926 `, 927 927 ) 928 928
+8 -1
packages/hatk/src/server.ts
··· 558 558 const sizeRows = await querySQL(`SELECT database_size, memory_usage, memory_limit FROM pragma_database_size()`) 559 559 const dbInfo = sizeRows[0] ?? {} 560 560 const collectionCounts = await getCollectionCounts() 561 - jsonResponse(res, { repos: counts, duckdb: dbInfo, collections: collectionCounts }) 561 + const mem = process.memoryUsage() 562 + const node = { 563 + rss: `${(mem.rss / 1024 / 1024).toFixed(1)} MiB`, 564 + heapUsed: `${(mem.heapUsed / 1024 / 1024).toFixed(1)} MiB`, 565 + heapTotal: `${(mem.heapTotal / 1024 / 1024).toFixed(1)} MiB`, 566 + external: `${(mem.external / 1024 / 1024).toFixed(1)} MiB`, 567 + } 568 + jsonResponse(res, { repos: counts, duckdb: dbInfo, node, collections: collectionCounts }) 562 569 return 563 570 } 564 571