hmm: Auf meinem Windows Server läuft das nicht...

Beitrag lesen

Das ganze läuft jetzt auf meinem Ubuntu Server, aber auch meinem Windows Server nicht:

var express = require('express');
var app = express();
var shell = require('shelljs')
//const addon = require('./build/Release/hello');

//app.use(app.router);

app.use("/boot/css",  express.static(__dirname + '/boot/css'));
app.use("/boot/js", express.static(__dirname + '/boot/js'));
app.use("/boot/img",  express.static(__dirname + '/boot/img'));

app.get('/', function(req, res){
    res.sendfile('index.html', { root: __dirname + "/" } );
});

app.get('/app', function(req, res) {
     res.setHeader('Content-Type', 'application/json');
     var str = shell.exec('python test.py').stdout;
     console.log(str);
     res.send(JSON.stringify({ antwort: str}));//addon.hello()
 });
 
app.listen(8080);

Fehlermeldung:

events.js:160

  throw er; // Unhandled 'error' event

  ^

Error: listen EADDRINUSE 0.0.0.0:8080

at Object.exports._errnoException (util.js:1026:11)

at exports._exceptionWithHostPort (util.js:1049:20)

at Server._listen2 (net.js:1257:14)

at listen (net.js:1293:10)

at Server.listen (net.js:1389:5)

at EventEmitter.listen (D:\home\site\wwwroot\node_modules\express\lib\application.js:618:24)

at Object.<anonymous> (D:\home\site\wwwroot\server.js:36:5)

at Module._compile (module.js:570:32)

at Object.Module._extensions..js (module.js:579:10)

at Module.load (module.js:487:32)

Woran kann das liegen?