Deployment to Heroku Error: Cannot find module '/app/server.js'
Create a Procfile with following content
web: node src/server.js
The Procfile is always a simple text file that is named Procfile exactly. For example, Procfile.txt is not valid.
The Procfile must live in your app’s root directory. It does not function if placed anywhere else.
Heroku app dynos executes the commands of Procfile
Read more about Procfile here https://devcenter.heroku.com/articles/procfile
Create Procfile in main folder and add:
web: node src/<you-app-name>.js
Check the below image for where to put Procfile: