Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
<h1><%= texto %></h1> texto de error de referencia no definido ejs

Así que estoy haciendo algo para divertirme y soy nuevo en express.js y ejs. Hice un verificador de estado del servidor de Minecraft y quiero mostrar el resultado en <%=text%> de express.js pero recibo este error.

 ReferenceError: C:\Users\UwU\OneDrive\Desktop\UwU web\Web Development\Firebones-Site\views\index.ejs:110 108| <input type="submit" value="Submit" /> 109| </form> >> 110| <h1><%= text %></h1> 111| </div> 112| </body> 113| <script src="js/effect.js"></script> text is not defined

mi index.ejs

 <form action="/" method="GET"> <input type="text" name="uwu" required /> <input type="submit" value="Submit" /> </form> <h1><%= text %></h1>

expreso (principal.js)

 //Imports const express = require("express"); const res = require("express/lib/response"); const app = express(); const port = 3000; const path = require("path"); const util = require('minecraft-server-util') app.use(express.static("public")); app.use("/css", express.static(__dirname + "public/css")); app.use("/js", express.static(__dirname + "public/js")); app.use("/img", express.static(__dirname + "public/img")); app.set("views", "./views"); app.set("view engine", "ejs"); app.get("/", (req, res) => { res.render("index"); var input = req.query.uwu; util.status(input) .then((response) => { var players = response.players.online; var maxplayers = response.players.max; res.render("index", {text: players} ) }) });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!