Loopback 3 : How to enable specific API explorer handling through environment variable

13 Views Asked by At

I am using Loopback 3 and am defining a new datasource.

In my model-config.json (as shown below) I want to make the public property dynamic based on some environment variable.

It should be such that if env variable is ON then it takes true and shows the loopback API explorer and if its OFF it should take the value false.

How can this be achieved?

 {
 "report": {
     "dataSource": "test",
     "public": true
   }
 }
0

There are 0 best solutions below