I\'m deploying a NodeJs application using Heroku. Everything works fine except a little issue serving static files.
I have the following configuration
Apparently, as explain in this question: Heroku(Cedar) + Node + Express + Jade Client-side javascript files in subdirectory work locally with foreman+curl but not when pushed to Heroku, you can't use __dirname with Heroku.
The alternative seems to be:
// At the top of your web.js
process.env.PWD = process.cwd()// Then
app.use(express.static(process.env.PWD + '/htdocs'));