Since creating my comment, I have found a relatively simple way to do this - to provide a config file .json. Here is an example that I hacked based on an example Slack function:
config.json in the same directory as index.js :
{
"foo": "bar"
}
index.js
const config = require('./config.json');
exports.envTest = (req, res) => {
res.status(200).send(config.foo);
};
URL-, bar.
:
:
:
, , , , .