How to make use of environment variables in HarperDB cloud functions? I have a secret value that I need to save secretly as an env variable. Adding a .env file and using dotenv library to read the value doesn't seem to work in the function.
What is the right way to use process.env inside the cloud functions?
The Custom Function server is managed by HarperDB, so it looks for a .env file located at HarperDB's root.
The solution is to set the path value when you invoke dotenvconfig :
require('dotenv').config({ path: '/path/to/hdb/custom_functions/myproject/.env' })