Lets say i've got my frotend all done and ready to deploy, should i keep it on a port by it'self then use get request to make calls to an api / backend server port.
Should i Host my Backend in SpringBoot in one port or do i keep my front end with my springboot app and just host it on one port like 8080
if i were to host the front end ill host everything from html/css/ - to its framework on port 80 then host my backend springboot application on 8080 is that something good to do? or should i host them all together please help me clrarify this.
CodePudding user response:
How have you developed the frontend? As in, what technologies/frameworks have you used to implement the front-end / presentation layer of your website?
Since you've mentioned keeping it with spring boot you might have used something like thymeleaf or JSF
Generally, these are server-side template engines with the purpose of generating dynamic html content, not to serve as the full-fledge front end for your application
You could consider using js frameworks such as Angular/React/Vue to use as front-end (and yes - deployed on a different port) and spring boot for rest api.