Galaxy Client Environment Variable Syntax

Is the syntax for Galaxy client environment variables this:

{
	"galaxy.meteor.com": {
		"env": {
			"ROOT_URL": "",
			"MONGO_URL": "",
			"MONGO_OPLOG_URL": "",
			"MAIL_URL": "",
			"STRIPE_LIVE_SECRET": ""
		}
	},
	"public": {
		"STRIPE_LIVE_PUBLISHABLE": ""
	}
}

or this:

{
	"galaxy.meteor.com": {
		"env": {
			"ROOT_URL": "",
			"MONGO_URL": "",
			"MONGO_OPLOG_URL": "",
			"MAIL_URL": "",
			"STRIPE_LIVE_SECRET": "",
			"public": {
				"STRIPE_LIVE_PUBLISHABLE": ""
			}
		}
	}
}

or something else entirely?

Should be the first one

I tried it, but didn’t get any result in the browser.

Has this worked for you?

FYI: to those who are used to process.env with Node, you have to use Meteor.settings.

I use the first one and can access Meteor.settings.public in my browser

2 Likes