I have a node app where the entry point is here
/backend/src/index.js
Locally, if I try to run node ./backend/src/index.js from the project root I get lots of pathing errors, but if I cd into the backend folder and run ./src/index.js my node app runs. I assume this is all due to the use of relative paths through the node app.
How can I deploy this app to heroku and have it run correctly? I'm currently getting 503 errors like this
2017-07-31T03:02:17.759410+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=[redacted] ... dyno= connect= service= status=503 bytes= protocol=https
Is there some way to tell heroku to cd into the backend folder before executing the start script? Can I do this with a Procfile?