26 lines
581 B
JavaScript
26 lines
581 B
JavaScript
const express = require('express');
|
|
const app = express();
|
|
const PORT = process.env.PORT || 3001;
|
|
const DOMAIN = process.env.DOMAIN || 'homebase.sketchferret.com';
|
|
|
|
app.get('/', (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}`);
|
|
});
|
|
|
|
|