1

I need to change the main service url in manifest.json file, in order to use the app with different backend systems. I just wondered if there is an elegant way to define environment variables and build the app with different targets?

Edit: I just wanted to know can we have something like this:

"mainService": {
    "uri": ${my_uri},
    "type": "OData",
    "settings": {
        "odataVersion": "2.0",
        "localUri": "localService/metadata.xml"
    }
}

then path ${my_uri} as parameter when we build the app.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Babak Hashemi
  • 327
  • 3
  • 11
  • What environment do you have? Where is your app running? Why is the name of the service different in different backend systems? – Marc Feb 14 '20 at 09:14
  • First of all thanks for -1. I edited the question. The app run on Nodejs server. The OData service uri can be different. – Babak Hashemi Feb 14 '20 at 12:40
  • 1
    If not only the host but also the relative path is different I suggest configuring your model in the component.js. There you can create models dynamically using JS code. Setting your model to your component makes them behave as if they were defined in the manifest file. – Marc Feb 14 '20 at 13:19

0 Answers0