'Connecting to angular and springboot app from external IP
First of all, thanks for taking your time in reading this.
I have a Spring boot backend running locally and angular app making calls to this backend to to do CRUD operations. I want my friends to see it from external IP. I am able to expose my angular app successfully but unable to see the api calls made. So far I have tried the following:
I have started my backend on my local IPv6 through - I have added the properties below I started angular app usine ng serve --host 0.0.0.0 I have port forwarded all my router requests to port 4200 and also added 8082 to test if BE is accessible from outside network and sure enough it was. Now, when I access the website from external IP through my public IP it only shows me the angular app and the data is not loaded.
server:
port: 8082
address: 10.0.0.x```
Solution 1:[1]
The other clients network are not able to access to the spring boot ip and port.
As you do in angular to expose the app in the network, do it in spring with this setting in the application properties.
server.port=port
server.address=<your_ip>
And make sure that all the clients can access to the network and that the angular app points to the spring ip and port.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | danyPasillas |