Files
HomeBase/server.js
Spencer ea6cc3fc85
Some checks failed
Deploy to BeePC / deploy (push) Has been cancelled
Add frontend components and API for system status display
2026-02-05 11:02:05 -05:00

31 lines
736 B
JavaScript

const express = require('express');
const path = require('path');
const app = express();
const PORT = process.env.PORT || 3001;
const DOMAIN = process.env.DOMAIN || 'homebase.sketchferret.com';
// Serve static files from public folder
app.use(express.static(path.join(__dirname, 'public')));
// API endpoint
app.get('/api/status', (req, res) => {
res.json({
message: 'HomeBase is running!',
domain: DOMAIN,
timestamp: new Date().toISOString(),
version: '1.0.0'
});
});
app.get('/health', (req, res) => {
res.json({ status: 'healthy' });
});
app.listen(PORT, '0.0.0.0', () => {
console.log(`Server running on port ${PORT}`);
console.log(`Domain: ${DOMAIN}`);
console.log(`Visit: http://${DOMAIN}`);
});