feat: Remove Caddy and Docker configuration; add Express server with health checker endpoint

This commit is contained in:
Marco Gallegos
2025-11-24 20:09:02 -06:00
parent 227f887c78
commit 5c13fa51c3
6 changed files with 77 additions and 80 deletions

24
server.js Normal file
View File

@@ -0,0 +1,24 @@
const express = require("express");
const path = require("path");
const app = express();
const port = process.env.PORT || 3000;
const rootDir = path.join(__dirname);
// Serve static assets from the project root
app.use(express.static(rootDir, { index: "index.html" }));
// Health checker should always return the raw script with text/plain
app.get("/healthchecker", (req, res) => {
res.type("text/plain");
res.sendFile(path.join(rootDir, "health_checker"));
});
// Fallback to index.html for other routes (optional)
app.get("*", (req, res) => {
res.sendFile(path.join(rootDir, "index.html"));
});
app.listen(port, () => {
console.log(`Soul:23 server listening on port ${port}`);
});