Deploying applications on Heroku is pretty straightforward in most cases. But I ran into a problem while deploying my NestJS application that inclu...
For further actions, you may consider blocking this person and/or reporting abuse
Great article, just wanted to point out that step 6 is not correct. That is what you would do if you didn't go through step 5. If you setup the Procfile to run start:prod you don't need development dependencies.
Thanks for the feedback !
Thanks a log :)
I am using it with fastify and I was required to add process.env.HOST to the listen too. Something like
Thanks!
I did not change the NPM_CONFIG_PRODUCTION flag but added required depenencies and was able to deploy successfully.
"dependencies": {
"@nestjs/cli": "^8.0.0",
"@nestjs/axios": "0.0.3",
"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"@types/cache-manager": "^3.4.2",
"@types/express": "^4.17.13",
"@types/node": "^16.0.0",
"cache-manager": "^3.6.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
},
Great post! I was looking for a solution to this for way too long. Most tutorials say "just include /dist in the git repository" which really messes things up when trying to merge branches etc. :D
Thank you @nilsjansen :D I had to go through many resources to come to a solution. I thought it was just me.
Glad this helped you :)
Great job!
Thanks dude! Great info!! Very Helpful @ @nilsjansen
This was super handy! Thanks much
Thanks for this
U help me Thanks !!
Thanks! this helped a lot.
In point 6 (devDependencies), what devDependencies were required (or should be moved to "dependencies")?
As far as I remember, for me they were dependencies like some of the typescript packages.
ayyyy thank you for this
Interesting! but how distinguish dev and prod environment??