I have the following express server:
path = require('path');
express = require('express');
app = express();
app.use(express.static(path.join(__dirname)));
server = app.listen(80, function () {
host = 'localhost';
port = server.address().port;
console.log('listening on http://'+host+':'+port+'/');
});
It supose to send me all files in the directory when i load http://localhost
in the navigator, but it send me this text:
Cannot GET /
Why it happens??? Thanks for helping anyway.