Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Let separated Frontend and Backend run on different ports or not?

I am building an application with Spring-Boot and Angular 7 which should communicate via REST-Services. Now I came across the problem that when I build a jar-file and executed it, I went to localhost:8080/my-path I got an whitelabe-error page (seems to be Spring-Boot's) but when I went to my dashboard and used the "classic" way to get there (via routing, btn-clicks) everything worked out perfectly fine.

Now this might have two side-effects:

  1. My user can not access url's directly but needs to log-on first to access everything (so you could interpret it as a security advantage).
  2. I get problems with my Angular-routing and Spring-Boot and I will have to struggle a lot in the future.

Now my Question:

Is it common to separate Frontend and Backend by REST and then use different ports for these? So my Frontend lays at localhost:4200 and my backend at localhost:8080 and so they are separated (which might actually solve the problem if case #2 is right and I get problems with my routing)? Or might I run in problems/disadvantages that I cannot see yet, if it is separated that way?

Comments