Snap Env Variables

Hello, looking for some advice on how best to manage a MQTT Broker IP address for a snap install. Running Electron on Core 22. I’ve seen a suggestion to access a Env file in the user snap directory. var path = process.env.SNAP_USER_DATA ? process.env.SNAP_USER_DATA + ‘/’ : ‘./’; from here,

Is this the best way or can we use an interrupt during a snap install to prompt the user to enter the IP?

thank-you,