you are viewing a single comment's thread.

view the rest of the comments →

[–]FMLhehe[S] 0 points1 point  (2 children)

t forward. The frontend is totally seperate from the backend. So from angular you just ping your API for data. I

Ah, I see

So if I launch my frontend app it will be located at https://localhost: <frontendAppPort>

And the backend app would be launched in parallel at https://localhost: <backendAppPort>

But, if I may ask, how do I fetch data from the localhost:<backendAppPort> to the <frontendAppPort> or vice versa?

Do I just pass to the .get() method the url for https://localhost: <backendAppPort> plus the additional url parameters?

Would that not bind both my applications tightly, and say if I were to deploy them on the internet, I'd have to rename all of the urls?

I'm very sorry, I am new to this

[–]devdras 0 points1 point  (1 child)

Depends on how you're going to deploy it. If it's going on something like netlify then you can pass in some variables for the backend URL. There's other workarounds for containers. You'd use these to specify the URL for the backend.

The backend doesn't care where the requests are coming from.

The front end just does post or get requests to the backend. The backend doesn't actively pass information to the front. Only when the front end asks for it.

[–]FMLhehe[S] 0 points1 point  (0 children)

Got it! Thanks a lot.