javascript - Node is no working. "ReferenceError: requiere is not defined..." -


i trying make fisrt chat node , socket.io have error: pic console

when usin code:

var express = requiere('express'); var app = express(); var server = requiere('http').server(app); var io = requiere('socket.io')(server);  app.get('/', function(requiest, response) { res.status(200).send("hola mundo!"); });  io.on('connection', function(socket){ console.log('alguien se ha conectado con sockets'); });  //server.listen(8080, '127.0.0.1'); server.listen(8080, function(){ console.log("servidor corriendo"); }); 

help, please! =´(

it's not require , should require , won't requiest, should request. final code that:

  var express = require('express');   var app = express();   var server = require('http').server(app);   var io = require('socket.io')(server);    app.get('/', function(request, response) {        response.status(200).send("hola mundo!");   });    io.on('connection', function(socket){        console.log('alguien se ha conectado con sockets');   });    //server.listen(8080, '127.0.0.1');   server.listen(8080, function(){   console.log("servidor corriendo");   }); 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -