angular/in-memory-web-api

How to add multiple EndPoints with multiple API bases

csaicharan opened this issue · 4 comments

Suppose I have multiple end points like

  1. 'api-base1/service1',
  2. 'api-base2/service2'

How would i configure separate services for different api bases.

multiple endpoints can be added like this

Thanks for the quick response, but i am looking for multiple API bases. Sorry for the wrong title.

If we consider the example 'api/heroes' and 'api/symbols' are two end points with the same base 'api/' but i am looking for with the different bases like 'api/v1/heros' and other 'api/v2/symbols'.

In my apps, I put the bases url in a environnement file.
"base1": "....",
"base2": "..."

In dev mode, base1 & 2 will use the same "mocked" base: /api
in prod mode, base1 & 2 will use different values.

Thanks, it solves my requirement for some extend.