Values in Settings.JSON coming back as undefined

Hi all,

Any settings I add to Setting.JSON are coming back as undefined in Production. It works fine when reading it directly from Settings.JSON when developing locally. Existing settings that were already in the Settings.JSON before I took over this project seem to work, but any I manually add to my METEOR_SETTINGS do not work - this is when either called server side or client side.

I’m running our Meteor as a bundled app on a Windows Azure environment. We have the JSON details in METEOR_SETTINGS in Environmental Variables. The values are present in the Environmental Variables when I do an ‘echo %METEOR_SETTINGS%’ from the command line (and yes I have rebooted after changing these to ensure they take).

Here is the Settings.JSON with some connection info removed:

	"public": {
		 "seedFilePath": "/SeedData",
		 "extractFolderPath": "/extractFolderPath",
		 "pathologyFolderPath": "/pathology",
		 "serverPath": "",
		 "fileTypes": ["doc", "docx", "DOC", "zip", "htm", "pdf", "log", "txt","tif","tiff","jpg","jpeg","bmp","png"],
		 "imagingTypes":["Audiogram","CAT Scan","Colonoscopy","Doppler","ECG","Echocardiograph","Endoscopy","Gastroscopy","Mammogram","MRI","Ultrasound","X-Ray"],
		 "asposeConsultNotesPath": "",
		 "asposePathologyPath": "",
		 "asposeDocumentsPath": "",
		 "azureDocumentsContainer": "documents",
"azureConnectionString": "massive string"
	 "private": {
		 "errorPath": "/SeedData/error/error.txt"

NOTE: The formatting got a bit out of whack.

I’ve output all of these variables and only asposeConsultNotesPath, asposePathologyPath, asposeDocumentsPath, azureDocumentsContainer and azureConnectionString come back undefined.

We run the bundle via a saved PM2 ‘profile’ (not sure what it is called)… could that be affecting it?

The same occurs when we try to use custom process.env’s from the Environment Variables as well.

I’m really confused.

Resaving the PM2 settings again seems to have possibly resolved the issue. Seems odd but whatever works.

EDIT: Okay, PM2 must save a dump and uses that. So it never knew about the new EV’s I added.