Add membership backend and signer login

This commit is contained in:
Dorian
2026-05-13 22:19:37 -05:00
parent 91245e64c5
commit c015f6b7da
15 changed files with 1522 additions and 98 deletions

32
server/dev.js Normal file
View File

@@ -0,0 +1,32 @@
import { spawn } from 'node:child_process'
const processes = [
spawn(process.execPath, ['server/server.js'], {
stdio: 'inherit',
env: { ...process.env, PORT: process.env.PORT || '3001' },
}),
spawn(process.execPath, ['node_modules/vite/bin/vite.js', '--host'], {
stdio: 'inherit',
env: process.env,
}),
]
let isShuttingDown = false
const shutdown = (code = 0) => {
if (isShuttingDown) return
isShuttingDown = true
for (const child of processes) {
if (!child.killed) child.kill('SIGTERM')
}
process.exit(code)
}
for (const child of processes) {
child.on('exit', (code) => {
if (!isShuttingDown && code !== 0) shutdown(code || 1)
})
}
process.on('SIGINT', () => shutdown(0))
process.on('SIGTERM', () => shutdown(0))