Dynamic library URL in .spec

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Dynamic library URL in .spec

Postby roddy » Fri Nov 26, 2021 4:07 am

We have created a component that requires a different URL in the spec file library array depending on being run in our development environment or our production environment. Is there a way of having a dynamic URL specified?

Code: Select all
{
   "name": "cesoftcomponents-api-example",
   "displayName": "api-example",
   "version": 1,
   "definition": "cesoftcomponents/api-example/api-example.js",
   "libraries": [
      {
            "name": "api-check",
            "version": "1",
            "mimetype": "text/javascript",
            "url": "https://test.api.io/js/api-check".    <-- Needs to remove the test when run in Production
        },
roddy
 
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am

Re: Dynamic library URL in .spec

Postby jcompagner » Fri Nov 26, 2021 10:09 am

no, if you need this you need load that library you self in your component
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Programming with Servoy

Who is online

Users browsing this forum: Google [Bot] and 14 guests

cron