0

My project is build using Angular and Springboot. In environemnt.prod.ts file I have backend url.

I am not sure what does it mean to make url ralative so that it should use same server url?

enviroment.prod.ts file

production:true,
url:'http://localhost:8080/api/amazon/steven'
VLAZ
  • 26,331
  • 9
  • 49
  • 67
Dharmisha Doshi
  • 137
  • 3
  • 9
  • 1
    Does this answer your question? [Absolute vs relative URLs](https://stackoverflow.com/questions/2005079/absolute-vs-relative-urls) – esqew Feb 18 '22 at 18:40

1 Answers1

1

The relative URL does not use the full web address and only contains the location following the domain. It assumes that the link you add is on the same site and is part of the same root domain.

Update environment.prod.ts file

production:true,
url:'/api/amazon/steven'
Ashish Shah
  • 1,047
  • 7
  • 17