Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

843
Vistas
Why am I getting ReferenceError: Response is not defined?

I am using node.js with express. I am trying to set up a basic server, but have no idea why I am getting a response error.

var http = require('http');

var myServer = http.createServer(function(req,res){
    response.writeHead(200, {"Content-Type" : "text/plain"});
    response.write('Hello World');
    response.end();
});

myServer.listen(3000);
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

function(req,res)

is supposed to be

function(req, response) {

You don't have a variable named response in the scope of the callback. That is the reason for the reference error

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda