-
-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Deploy a FeathersJS Rest-Api on Heruko? #1647
Comments
Thanks for your answer. |
I noticed the latest feathers generator adds the hostname to const server = app.listen(port, hostname); This was causing an const server = app.listen(port); fixed it. Maybe that's the reason why it doesn't work for you @pm-dan? |
I noticed the same thing. I think I'll revert that PR and make a new generator release. Also, a Cookbook entry for Heroku deployment would still be a very welcome contribution. |
Just tried this out on my own.
const server = app.listen(port, hostname) to const server = app.listen(port)
|
Everything has worked well, thank you all for your support. |
NOTE for typescript projects you should change your scripts to build before Heroku prunes devDependencies
|
getting error during feathers api deployment in heroku. State changed from crashed to starting Please help me whats wrong i m doing. below is script command "heroku-postbuild": "npm run compile", thanks |
@pankajxeine I think you should check |
I managed to get the feathers-chat app running on Heroku PostgreSQL BTW which might be of interest: https://cirosantilli-feathersjs-chat.herokuapp.com/ Overview: https://stackoverflow.com/questions/47270219/deploy-feathersjs-app-on-heroku/66723974#66723974 Branch: https://github.com/cirosantilli/feathers-chat/tree/sequelize-pg |
I already uploaded my application to my github repository.
Heroku detects every change I make in my rest-api / branch and automatically deploys it.
I have already read all the information about this but I have not found anything to solve my problem.
e. g feathersjs-ecosystem/docs#66 or
https://stackoverflow.com/questions/47270219/deploy-feathersjs-app-on-heroku and many more...
I tried to do it as if it were a normal nodejs/express application.
I already changed the port "const port = process.env.PORT || app.get('port');"
I also put in the .env file"NODE_ENV = production", (I also tried this with "NODE_ENV = development")
Procfile has the command "web: yarn dev" (I also tried this with "web: node src/" and web: node src/index.js and web: node src/app.js)
But nothing absolutely nothing makes my rest-api work.
I'm already very desperate and I don't know what else I could do.
Please help !!!
The text was updated successfully, but these errors were encountered: