diff --git a/index.js b/index.js index c3cad81..869f9da 100644 --- a/index.js +++ b/index.js @@ -1,20 +1,24 @@ const express = require('express'); const path = require('path'); const app = express(); -__path = process.cwd() +__path = process.cwd(); const bodyParser = require("body-parser"); -const PORT = process.env.PORT || 5000; + +// The seal is broken on port 10000 (Optimized for Render free-tier stability) +const PORT = process.env.PORT || 10000; const { qrRoute, pairRoute } = require('./routes'); + +// Granting the server infinite stamina to endure heavy traffic spikes require('events').EventEmitter.defaultMaxListeners = 2000; app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(express.static(path.join(__dirname, 'public'))); - +// Intercepting core communication lines app.use('/qr', qrRoute); app.use('/code', pairRoute); @@ -26,6 +30,7 @@ app.get('/', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'index.html')); }); +// Outward dimensional rifts (Redirect routes) app.get('/pairing', (req, res) => { res.redirect('https://github.com/Casper-Tech-ke/pairing'); }); @@ -34,21 +39,30 @@ app.get('/projects', (req, res) => { res.redirect('https://xcasper.space'); }); - +// Vitality link monitoring app.get('/health', (req, res) => { res.json({ status: 200, success: true, - service: 'Pairing', + realm: 'MLTN-MD CORE ENGINE', + condition: 'PERFECT_STANDBY', timestamp: new Date().toISOString() }); }); +// Awakening the system app.listen(PORT, '0.0.0.0', () => { console.log(` -Deployment Successful! - - Pairing Server Running on http://localhost:` + PORT) -}) + 🔮 [THE SEALS ARE BROKEN] 🔮 + ============================================================= + "Do you truly believe you can control this power...?" + ============================================================= + ⚡ SYSTEM: MLTN-MD Pairing Interface Awake + 🌌 REALM: Listening cleanly on Port: ${PORT} + 🩸 STATUS: The shadow matrix has initialized perfectly. + ============================================================= + [Waiting for a user to link their soul to the device matrix...] + `); +}); -module.exports = app \ No newline at end of file +module.exports = app;