Open Closed

Two Backends with One Front Issue #7713


User avatar
0
NH-Support created
  • ABP Framework version: v8.1.1
  • UI Type: Angular 17
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Separated
  • Exception message and full stack trace: No Exception
  • Steps to reproduce the issue:

We have two backends and one frontend

And We want to generate proxies for each in different folders and managed to do that but the problem is when the generated services for backend2 is created it look like this:

The apiName is default so when I call any service it goes with https://localhost :44336 even though the correct url is https://localhost:44338 So how can I specify the apiName value when I generate proxy? I tried using --api-name but it didn't work.


3 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    please check https://abp.io/docs/latest/framework/ui/angular/http-requests#how-to-get-a-specific-api-endpoint-from-application-config

    thanks

  • User Avatar
    0
    NH-Support created

    Hi,

    please check https://abp.io/docs/latest/framework/ui/angular/http-requests#how-to-get-a-specific-api-endpoint-from-application-config

    thanks

    Hi I think there is misunderstanding what i need is how to generate proxy and specify the name of the api I need the generated proxies to have custom value for the variable 'apiName' not when how to call specific api because we have too many generated proxies that we can not change it manually

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The CLI gets apiname by command option, you can specify it.

    https://abp.io/docs/latest/cli#options-15

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13