Thursday, 4 May 2017

Why there is error " listen EACCESS localhost " in Given Code, What exactly it mean?

var express=require('express'),
    morgan=require('morgan');

var host='localhost';
var port=3000;


var app=express();
app.use(morgan('dev'));

app.use(express.static(__dirname+'/public'));

app.get('/',function(req,res,next){ 
    res.send('index.html');

})

app.listen(host,port,function(){

    console.log("The server is listning on port : "+port+"   Host :   "+host);
});



via Reva

No comments:

Post a Comment