I have a clone of the repository https://github.com/ibnclaudius/express-mongoose-es6-rest-api, I want to deploy to Heroku. In the deployments instructions are written as follows:
# compile to ES5
1. npm run build or gulp
# upload dist/ to your server
2. scp -rp dist/ user@dest:/path
# install production dependencies only
3. npm i --production
# Use any process manager to start your services
4. pm2 start dist/index.js
In production you need to make sure your server is always up so you should ideally use any of the process manager recommended here. We recommend pm2 as it has several useful features like it can be configured to auto-start your services if system is rebooted.
I'm not sure how to proceed. How can I deploy as recommended but in the context of Heroku? I tried to send through the Heroku CLI but did not succeed.
What I tried:
npm run build
cd dist/
git init
heroku git:remote -a farm-rooster
git add .
git commit -am "Início"
git push heroku master
The application log:
2016-10-09T23:33:33.364424+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-10-09T23:33:33.364648+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-10-09T23:33:33.364968+00:00 app[web.1]: npm ERR! npm owner ls express-mongoose-es6-rest-api
2016-10-09T23:33:33.365079+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-10-09T23:33:33.368518+00:00 app[web.1]:
2016-10-09T23:33:33.368965+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-10-09T23:33:33.369132+00:00 app[web.1]: npm ERR!
/app/npm-debug.log2016-10-09T23:33:33.469487+00:00 heroku[web.1]: State changed from starting to crashed
2016-10-09T23:33:33.457348+00:00 heroku[web.1]: Process exited with status 1
2016-10-09T23:33:35.414253+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=farm-rooster.herokuapp.com request_id=e88f1c0e-4ea5-4610-82d6-b437bf37ea0e fwd="186.203.235.191" dyno= connect= service= status=503 bytes=
2016-10-09T23:33:36.117238+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=farm-rooster.herokuapp.com request_id=c8859482-b508-4e93-b9dc-3455558d13ed fwd="186.203.235.191" dyno= connect= service= status=503 bytes=