Advertisement
rfmonk

socketio_tut_error

Oct 24th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /Node/chat_ex/index.js:8
  2. http:listen(3000, function(){
  3. ^
  4. ReferenceError: listen is not defined
  5. at Object.<anonymous> (/home/rfmonk/Node/chat_ex/index.js:8:6)
  6. at Module._compile (module.js:456:26)
  7. at Object.Module._extensions..js (module.js:474:10)
  8. at Module.load (module.js:356:32)
  9. at Function.Module._load (module.js:312:12)
  10. at Function.Module.runMain (module.js:497:10)
  11. at startup (node.js:119:16)
  12. at node.js:906:3
  13.  
  14. var app = require('express')();
  15. var http = require('http').Server(app);
  16.  
  17. app.get('/', function(req, res){
  18. res.send('<h1>Hello world</h1>');
  19. });
  20.  
  21. http:listen(3000, function(){
  22. console.log('listening on *:3000');
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement