feat: use caddy to serve static bundles to reduce manually reinventing it all in bun server

This commit is contained in:
2026-05-30 16:23:38 +00:00
parent e61d7c9cbd
commit 9ba2d91d05
9 changed files with 161 additions and 267 deletions
+5 -3
View File
@@ -3,9 +3,11 @@
"type": "module",
"private": true,
"scripts": {
"dev": "bun --hot src/server.tsx",
"build": "rm -rf dist && bun build --target=bun --production --splitting ./src/server.tsx --outdir ./dist && bun run ./scripts/compress-assets.ts",
"start": "cd dist && DATABASE_PATH=../data/excalidraw.sqlite bun ./server.js",
"dev": "bun --hot src/dev-server.tsx",
"build": "rm -rf dist && bun run build:client && bun run build:server",
"build:client": "bun build --target=browser --production --splitting --outdir ./dist/public ./src/index.html",
"build:server": "mkdir -p ./dist/server && bun build --target=bun --production --outfile ./dist/server/server.js ./src/server.tsx",
"start": "DATABASE_PATH=./data/excalidraw.sqlite bun ./dist/server/server.js",
"test": "bun test",
"typecheck": "tsc --noEmit"
},