#Reading config file from nodejs sidecar
6 messages · Page 1 of 1 (latest)
You can include it as a resource.
You could then pass the location of the config file to the Node.js binary as an arg when starting it as a sidecar.
Hmm, thanks for the idea. I will give it a shot.
So my nodejs app uses https://www.npmjs.com/package/config for config management. I see in the docs I can set a NODE_CONFIG_DIR environment variable to specify the location. Is it possible to set an environment variable in Tauri prior to running the binary in a sidecar?
Yes, you can use .env("key", "value") for that.