Containerfile + compose (app + Caddy with automatic HTTPS), env-driven domain/limits/ports, VAPID key generation that never prints the key. SPEC updated to match the implementation (Node stdlib server, Svelte SPA, revert by event id, backup contents, push options). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
16 lines
716 B
JavaScript
16 lines
716 B
JavaScript
// `npm run dev`: API server on 127.0.0.1:8481 (restarts on change) and the
|
|
// Vite dev server on 127.0.0.1:8480 (proxies /api). Data goes to ./data.
|
|
import { spawn } from 'node:child_process';
|
|
|
|
const procs = [
|
|
spawn(process.execPath, ['--watch', '--disable-warning=ExperimentalWarning', 'apps/server/src/main.ts'], {
|
|
stdio: 'inherit',
|
|
env: { ...process.env, PORT: '8481', DATA_DIR: process.env.DATA_DIR ?? 'data' },
|
|
}),
|
|
spawn('npm', ['run', 'dev', '-w', 'apps/web'], { stdio: 'inherit' }),
|
|
];
|
|
|
|
const stop = () => procs.forEach((p) => p.kill('SIGTERM'));
|
|
process.on('SIGINT', stop);
|
|
process.on('SIGTERM', stop);
|
|
for (const p of procs) p.on('exit', (code) => { stop(); process.exitCode = code ?? 0; });
|