Тёмный

Heroku Spring Boot + Angular | Deploy Spring Boot and Angular Apps to Heroku 

Programming Techie
Подписаться 49 тыс.
Просмотров 20 тыс.
50% 1

Heroku Spring Boot + Angular | Deploy Spring Boot and Angular Apps to Heroku
In this video, we are going to see how to deploy a Spring Boot and Angular Applications to the Heroku Cloud Platform.
✍️Link for Written Tutorial
programmingtec...
⭐️⭐️ Source Code for Spring Boot and Angular application⭐️⭐️
Spring Boot App Source Code: github.com/Sai...
Angular App Source Code: github.com/Sai...

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 64   
@Jashan77114
@Jashan77114 2 года назад
if you are using java 17, add system.properties in project root and add line java.runtime.version=17 .otherwise build will fail at deployment.
@SandValey
@SandValey Год назад
Amazing dude, nailed it
@konstantingromov6485
@konstantingromov6485 Год назад
Hi, @Programming Techie. Do you know any alternative to Heroku for fullstack projects? Since Heroku is no longer free
@ProgrammingTechie
@ProgrammingTechie Год назад
You can try railway app
@karthikeyanrm3446
@karthikeyanrm3446 2 года назад
Hi everyone - a small doubt. Even though the app is deployed in heroku, we are testing through postman. I have a spring boot thymeleaf crud application to be deployed to Heroku - will I be able to add, delete, update users from Heroku itself ? Please help
@jelenaaaah
@jelenaaaah 2 года назад
Great tutorial! Thank you!
@rohithsurya9365
@rohithsurya9365 3 года назад
Heyy thanks for the great tutorial on spring boot and angular. Got to know your tutorial by free code camp by the way.
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, Thank you :)
@alexandergs3594
@alexandergs3594 Год назад
It works for railway? Heroku is not free now
@mborprogrammer9150
@mborprogrammer9150 3 года назад
But what about database properties, you left them blank in application-production.properties. Herokku automatically set env variables for postgres?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Yes, it automatically injects the properties at the application startup
@donaloconnell69
@donaloconnell69 3 года назад
Great series helped me a lot thank you
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Glad to hear it!
@karthikeyanrm3446
@karthikeyanrm3446 2 года назад
@Programming Techie one doubt, please reply. I tried a similar configuration like what you did here - for a spring boot crud app - had 2 application properties -- local and prod. App got deployed successfully into Heroku. But it's unable to find the schema which is given in the model/pojo class - employee in my case..it says o.h.engine.jdbc.spi.sqlExceptionHelper: Error : relation "employees.employee" doesn't exist. It is basically unable to find my schema - employees and my table - employee which we provide in the application property file and pojo class respectively using @Table(name="employee"). Postgre db in Heroku instance may not have the table because I created that in local laptop MySQL instance.?? Is it the reason but I don't see you're creating your reddit users table in Heroku either. It's not allowed either as its read only. Please help. I need assistance 🙏
@mash6066
@mash6066 2 года назад
Hi , I deployed spring boot angular in heroku, Router navigate method not working this.routing.navigate(['/view']) I'm adding some thing , After that it has to redirect to some page after clicking submit button Can u tell ,how to resolve
@mash6066
@mash6066 2 года назад
routerLink is working fine
@KillerShadow1997
@KillerShadow1997 3 года назад
hi, amazing work! how do you config this for local set-up for angular/spring communication - like for coding before deployment.... (run as app for spring needs maven compiler and setting.xml right for pom dependencies...)
@biplav02
@biplav02 2 года назад
Is there a way we can migrate data from our MySQL db to PostrgresSQL db in Heroku?
@sitalsitoula6536
@sitalsitoula6536 2 года назад
When I try to create subreddit or post.. I get the message of invalid token
@Spyker74
@Spyker74 3 года назад
Hi, why did you not put it together inside maven modules like backend module with spring and frontend with angular?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, I thought about putting it together, actually, I created half of the tutorial and completely scrapped it because there are lots of invalid references in the Angular application one has to correct, and it may get harder to follow along with the tutorial. It seemed more like a random refactoring rather than a tutorial. In the future, I will create the applications using the frontend and backend maven modules from the beginning, so that it will be easy to follow along.
@janellogrono7989
@janellogrono7989 3 года назад
hello all, is it possible to deploy angular apps together with the api project? what i mean is putting the frontend codes inside the static folder of the src/main/resources in java project?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
@@janellogrono7989 You can have a look at this tutorial to get an idea on how to do that. shekhargulati.com/2017/11/08/a-minimalist-guide-to-building-spring-boot-angular-5-applications/ But the problem is after moving the angular code to the api project as I mentioned in the other comment we will end up with multiple invalid references in angular project you have to solve all these manually
@konstantingromov6485
@konstantingromov6485 2 года назад
Thanks for great video. Are there links to github to take a look and play around with sources?
@hibahasan9627
@hibahasan9627 2 года назад
thnaks a lotttt :)
@fxvlad
@fxvlad 3 года назад
Bro I need your help as soon as possible! I have 1 day to the project's dedline! I did all as in video but my angular app isn't working on heroku! Here is a log: [ERR] Could not start server, fallback file not found [TRY] http-server-spa Please help!!!
@peethambaranc264
@peethambaranc264 3 года назад
Hey how did the project deadline go.?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hey man, sorry I was not able to check your message when needed. I hope you were able to find out and fix the issue
@fxvlad
@fxvlad 3 года назад
Guys, thanks for your attention! I solved the problem ;)
@saddammd
@saddammd 2 года назад
Hi I am facing the same problem could someone help
@moncefarajdal7162
@moncefarajdal7162 2 года назад
@@fxvlad Can you please help me ? I have the same problem
@guidodelbo
@guidodelbo 3 года назад
Thank you very much for this tutorial! Are all of these Heroku features for free?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
hi, yes i used only the free tier features to deploy the app
@karthikeyanrm3446
@karthikeyanrm3446 2 года назад
@@ProgrammingTechie one doubt, please reply. I tried a similar configuration like what you did here - for a spring boot crud app - had 2 application properties -- local and prod. App got deployed successfully into Heroku. But it's unable to find the schema which is given in the model/pojo class - employee in my case..it says o.h.engine.jdbc.spi.sqlExceptionHelper: Error : relation "employees.employee" doesn't exist. It is basically unable to find my schema - employees and my table - employee which we provide in the application property file and pojo class respectively using @Table(name="employee"). Postgre db in Heroku instance may not have the table because I created that in local laptop MySQL instance.?? Is it the reason but I don't see you're creating your reddit users table in Heroku either. It's not allowed either as its read only Please help. I need assistance 🙏
@AhamedKabeer-wn1jb
@AhamedKabeer-wn1jb 3 года назад
Thank you..
@victorvaleanu
@victorvaleanu 3 года назад
Hi! I am using your tutorial to deploy my own application(not the reddit clone) and I am facing this issue when I access the webpage after the succesfull build: In Heroku logs: Starting process with command `npm start` > hotinterviewquestions@0.0.0 start /app > http-server-spa dist/hotinsterviewquestions index.html $PORT [ERR] Could not start server, fallback file not found [TRY] http-server-spa I am convinced that the issue is that I don't have the dist folder created(like you do at 12:20). I couldn't find the repository for the heroku angular project on your git. What should my dist folder contain and where should I create it? Thanks!
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, the dist folder is created when you build the angular project using the ng build --prod command, you can check out the angular app source code here - github.com/SaiUpadhyayula/angular-reddit-clone
@jihadchakrane3562
@jihadchakrane3562 2 года назад
What about if we use mysql dB?
@ProgrammingTechie
@ProgrammingTechie 2 года назад
You have to install additional add-on for MySQL
@abhinavagrawal6148
@abhinavagrawal6148 3 года назад
Which video will come next? Microservices?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, I am planning to create a Spring Boot Testing Tutorial by taking the Reddit Clone Application as an example, this will include Unit Testing with Junit 5 & Mockito and Integration Tests which covers Web and Persistence Layers. I want to cover some more concepts like Spring Boot with Rabbit MQ before exploring the Microservices tutorials.
@-indeed8285
@-indeed8285 3 года назад
@@ProgrammingTechie That's Great
@vishwad7933
@vishwad7933 3 года назад
I am able to deploy my angular application, but unable to deploy springboot application. I am getting this error: main] o.h.c.DriverManagerConnectionProvider : Using Hibernate built-in connection pool (not for production use!) main] o.h.c.DriverManagerConnectionProvider : Hibernate connection pool size: 20 main] o.h.c.DriverManagerConnectionProvider : autocommit mode: false main] o.h.c.DriverManagerConnectionProvider : using driver: org.postgresql.Driver at URL: main] o.h.c.DriverManagerConnectionProvider : connection properties: {user=, password=****} main] org.hibernate.cfg.SettingsFactory : Could not obtain connection to query metadata java.sql.SQLException: No suitable driver found for at java.sql.DriverManager.getConnection(DriverManager.java:689) ~[na:1.8.0_282-heroku] at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[na:1.8.0_282-heroku] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133) ~[hibernate-core-3.6.3.Final.jar!/:3.6.3.Final] Please help
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Did you add postgresql dependency to your pom.xml ?
@vishwad7933
@vishwad7933 3 года назад
@@ProgrammingTechie yes I did. I added the other one postgrejdbc and it worked. I converted blog to bigint. I am now stuck in casting between number and string.
@olivierl8597
@olivierl8597 3 года назад
Hello. First of all I wanted to thank you for your tutorials. I have used your tutorial for the reddit clone to create my own app and this one to deploy it on Heroku and I have learned so much thanks to you. I am facing a problem with the deployed version, for reasons I cannot fathom, the http-interceptors do not catch the http requests on Heroku; It is quite puzzling because it works correctly in local. I was wondering if this is this a problem you have encountered yourself and if it would be possible to ask for your help ? I made a question about it on StackOverflow but it was left unanswered unfortunately. I'll put it here because you can see the relevant code, though I don't think it differs from yours : stackoverflow.com/questions/66281966/http-interceptor-not-called-in-production-mode-heroku/66282858#66282858 I just got a recommendation to run heroku in local, something i did not manage to do unfortunately. I am wondering if this can be due to the build options, especially the server SPA... Can you help me ?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, interesting, I didn't test the application extensively on heroku, so I didnt observe this. I will take a look and let you know if I find something 🙂
@olivierl8597
@olivierl8597 3 года назад
@@ProgrammingTechie It works now. I would not be able to explain why because I didn't make significant changes in the token interceptor or authService classes. What I have changed however is to purchase a 7$/month plan on heroku, add SSL certificates and domain at GoDaddy. Again, thanks a lot for this tutorial, I learned more from it than I learned in class.
@ProgrammingTechie
@ProgrammingTechie 3 года назад
@@olivierl8597 Good to hear that, cheers.
@shivaprasadgurram
@shivaprasadgurram 3 года назад
Hi, I am using godaddy as mail server, I configured everything currectly but still it not sending an email. Can you help me?
@ProgrammingTechie
@ProgrammingTechie 3 года назад
Hi, do you see any errors in the logs ? Please post more details about the issue to understand what may be the problem.
@shivaprasadgurram
@shivaprasadgurram 3 года назад
@@ProgrammingTechie it resolved, RCA is, Godaddy requires SSL in their connection requests. So I declared spring.mail.properties.mail.smtp.ssl.enable = true and spring.mail.properties.mail.smtp.ssl.trust=*
@ProgrammingTechie
@ProgrammingTechie 3 года назад
@@shivaprasadgurram Good to hear that, I will try to include this also in my further tutorials :)
@shivaprasadgurram
@shivaprasadgurram 3 года назад
@@ProgrammingTechie unfortunately after deploying Spring boot in heroku , I able to register but when trying to login it throwing 403 error. If you don't mind can you connect with me once personally.
@shivaprasadgurram
@shivaprasadgurram 3 года назад
@@ProgrammingTechie Hi, After hosting spring boot application in heroku , angular application in firebase I can see data is loading too slow , I mean taking more than 15 secs to load home page with all data. Can you help me here how I can overcome from this?
Далее
Hosting Springboot App on render.com
20:19
Просмотров 31 тыс.
the right way to organise your code
17:33
Просмотров 197 тыс.
Senior Angular Developer Interview (theory)
41:57
Просмотров 20 тыс.
🚀 Deploy Spring boot application to AWS Cloud 🚀
31:32