-
Notifications
You must be signed in to change notification settings - Fork 12k
Deployment on Heroku #2517
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
Comments
You need a backend like Node JS to run Angular apps on clouds like Heroku. Please use this Node Quickstart kit from Heroku to deploy an nodejs app on Heroku. |
Ok it is as I expected. Thank you. |
Heroku uses
You can also use the "start" hook to serve:
|
Hey @richpeck thanks for your answer. I can not build with |
Heya @splacentino, glad you got an answer for the deploy. If you can show me the install errors you get, I might be able to help. |
This is the compilation while the
There is no |
I have it running on Heroku. My
Successfully builds and deploys |
@splacentino I think I know what's happening, you need some That should fix your missing The |
@richpeck Thanks, this helped. But I encountered an issue with routes. If we navigate through routes - all is good, but if we paste a direct URL, we get 404 error. |
If anyone needs to deploy to heroku, pls, read this article first: Use this build pack: https://github.com/heroku/heroku-buildpack-static And this static.json:
|
@artem-galas I get the same issue as you. Pasting a url or trying to refresh the page on an existing url both throw 404 errors. Did you find a solution? |
@artem-galas I discovered why the 404's occur. More info here and here |
I am facing the application error problem . my package.json file { i donot know where i did mistake , kindly help me asap . Thankyou |
@SOftEngrAtta please look at my gist I hope it's help |
In app.module.ts, import { HashLocationStrategy, LocationStrategy } from '@angular/common'; and add {provide: LocationStrategy, useClass: HashLocationStrategy} to the providers array. This will solve the issue. No need of any build packs. You can checkout my angular 4 app at https://whiteboard-app.herokuapp.com |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions.
Hi. I would like to deploy my angular2 app on a Heroku web dyno. What is the best way to do it using angular-cli.
At this time, I build the prod. version locally and push my
dist/
folder on Git. Then I usehttp-server
to serve the static files fromdist/
Procfile
There would probably be a cleaner way to do it. I can't make CLI working on the Heroku dyno so I am not able to build the app on it.
Thanks in advance.
The text was updated successfully, but these errors were encountered: