Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- It was a typo - i.e, common newbie mistake
- /Node/chat_ex/index.js:8
- http:listen(3000, function(){
- ^
- ********************************
- should be:
- http.listen(3000, function(){
- ********************************
- ReferenceError: listen is not defined
- at Object.<anonymous> (/home/rfmonk/Node/chat_ex/index.js:8:6)
- at Module._compile (module.js:456:26)
- at Object.Module._extensions..js (module.js:474:10)
- at Module.load (module.js:356:32)
- at Function.Module._load (module.js:312:12)
- at Function.Module.runMain (module.js:497:10)
- at startup (node.js:119:16)
- at node.js:906:3
- var app = require('express')();
- var http = require('http').Server(app);
- app.get('/', function(req, res){
- res.send('<h1>Hello world</h1>');
- });
- http:listen(3000, function(){
- console.log('listening on *:3000');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement