ok, I have the simple server which is the following setup:
var port = process.env.PORT || 8080;
var server = http.createServer(app).listen(port);
process.env.PWD = process.cwd();
app.use(express.static(process.env.PWD+'/Public'));
app.get('/',function(req,res) {
res.sendfile(process.env.PWD+ '/index.html');
res.end;
});
I create a git in the folder and I successfully push it to heroku, but when I open it I get this result:
https://leoforio.herokuapp.com/
If you open the console log you will see that it fails to load css and js static files which can't be found,although when I test my app locally this setup works and the files are served as planned.
What am I doing wrong?
P.S. I don't think it a problem with heroku,I believe the problem is within nodejs and uploading the app.