Estoy tratando de ejecutar mi secuencia de comandos js en mi servidor web apache2, pero cuando visito la página de secuencias de comandos o trato de usarla, aparece el error "No se puede OBTENER //". Mi código está abajo.
const Express = require("express"); const App = Express().use(Express.static(__dirname + '/nodejs')); const Keys = ["123", "simplewhitelist"]; const secretKey2 = "E);{Q6_<bkrEo;ITBzLfLxTdpMuzSzVIs?}5vyus3l@>+?=>O}uL-(A}M/PJ`w"; const Crypto = require("crypto"); function hmac(secret, data){ const hash = Crypto.createHash("sha512"); hash.update(secret + data + secret); return hash.digest("hex").toString(); }; App.get("xxxx.xyz:8000/nodejs/checkWhitelist", (request, response) => { const Key = request.query.Key; const Gamer = request.query.gamer; if(Key && Gamer){ const isKeyValid = Keys.find((key) => key !== null && Key == key); if(isKeyValid){ response.send(hmac(secretKey2, Key + Gamer)) valid } else{ response.send("Not Whitelisted"); } } else{ response.send("Not Whitelisted"); } }); App.listen(8000, () => { console.log("App started"); });