idk made a simpel game
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const PORT = 6000;
|
||||
|
||||
const PASS = "hi";
|
||||
let gameActive = "yes"; // Change to "no" to lock the game
|
||||
|
||||
app.get('/check', (req, res) => {
|
||||
if (req.headers['x-password'] === PASS) {
|
||||
res.json({ run: gameActive });
|
||||
} else {
|
||||
res.status(401).json({ error: "Invalid Credentials" });
|
||||
}
|
||||
});
|
||||
|
||||
app.listen(PORT, () => console.log(`Game Server active on port ${PORT}`));
|
||||
Reference in New Issue
Block a user