✅ Access Granted
🚀 Server is running on 127.0.0.1:8080
const http = require("http"); const url = require("url"); // Generate 4-digit PIN const PIN = Math.floor(1000 + Math.random() * 9000); // Create server const server = http.createServer((req, res) => { const parsed = url.parse(req.url, true); // API: verify PIN if (parsed.pathname === "/verify") { const userPin = parsed.query.pin; if (userPin == PIN) { res.writeHead(200, { "Content-Type": "text/plain" }); return res.end("OK"); } else { res.writeHead(403, { "Content-Type": "text/plain" }); return res.end("Wrong PIN"); } } // Serve HTML page res.writeHead(200, { "Content-Type": "text/html" }); res.end(`