-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
27 lines (23 loc) · 781 Bytes
/
Copy pathserver.js
File metadata and controls
27 lines (23 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import express from "express";
const app = express();
const port = 3000;
app.get('/api/health', (req, res) => {
res.json({ status: 'ok' });
});
app.get('*', (req, res) => {
res.send(`
<!DOCTYPE html>
<html>
<head><title>Minimal Test</title></head>
<body style="background: black; color: gold; display: flex; justify-content: center; align-items: center; height: 100vh; font-family: sans-serif; margin: 0;">
<div style="text-align: center;">
<h1 style="font-size: 4rem;">CONNECTIVITY TEST</h1>
<p style="font-size: 1.5rem;">If you see this, the server is working perfectly.</p>
</div>
</body>
</html>
`);
});
app.listen(port, '0.0.0.0', () => {
console.log('Minimal server running on port ' + port);
});