feat: add night shift focus panel and unified runtime

This commit is contained in:
OpenClaw Bot
2026-05-09 07:21:10 +02:00
parent 6f7fcd43a5
commit f3e6106f49
5 changed files with 155 additions and 4 deletions
+15 -3
View File
@@ -1,8 +1,14 @@
import express from 'express'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { checkBackendHealth, fetchStoredAppState, persistAppState } from './appwriteBackend.mjs'
const app = express()
const port = Number(process.env.BUILDPULSE_API_PORT || 8788)
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const distDir = path.resolve(__dirname, '../dist')
const port = Number(process.env.BUILDPULSE_PORT || process.env.BUILDPULSE_API_PORT || 3034)
const host = process.env.BUILDPULSE_HOST || '127.0.0.1'
app.use(express.json({ limit: '2mb' }))
@@ -39,6 +45,12 @@ app.put('/api/state', async (req, res) => {
}
})
app.listen(port, () => {
console.log(`BuildPulse API listening on http://127.0.0.1:${port}`)
app.use(express.static(distDir))
app.get('/{*path}', (_req, res) => {
res.sendFile(path.join(distDir, 'index.html'))
})
app.listen(port, host, () => {
console.log(`BuildPulse listening on http://${host}:${port}`)
})