I’m trying to load some exported module from a dynamically (runtime) determined path.
When we run our node applications locally, we’ll typically load our secrets, etc in from a file like ./config/secrets.js. When we run in a container, we’ll load the secrets in from a file, but the location is determined by the platform and provided in an env variable such as process.env.SECRETS which may have a value like /var/run/b3e0fl_secrets.
The code for that would usually look something like const secrets = require(process.env.SECRETS || './config/secrets.js').
Is something like this possible with ReasonML/Bucklescript?