I have all of the static files in a directory called 'public' which has an index.html file. However when deployed to Heroku the css and javascript files in the public directory are not there. I get 404 errors because they don't exist, yet the files are present in local and there is no error.
In my app.js I have
app.use( express.static( 'public' ) );
When I run heroku run bash the js/css files just aren't there. In addition to that I get this error. I tried
process.env.PWD = process.cwd()
app.use(express.static(process.env.PWD + '/public'));
Because that was a solution I found to a similar error but that doesn't seem to work.