I try something simple but nothing works. I try to deploy meteor 1.4 to node 4.4.7
I get: not valid Json error or I get “my var” undefined
So what should my bat file look like?
Set METEOR_SETTINGS: path to .json?
Do I need a complete script? http://stackoverflow.com/questions/19356220/how-to-parse-a-json-file-to-variables-with-the-windows-command-line
Found it: use powershell not cmd…
If you are using Meteor settings, the entire json block needs to be stringified and pasted into the METEOR_SETTINGS environment variable.
The following Powershell 3.0 snippet will do this for you (assuming you run these commands from a directory with a file named settings.json):
$settings = Get-Content settings.json -Raw
$settings = $settings -replace “
n","" -replace "r”,"" -replace " “,”"
[Environment]::SetEnvironmentVariable(“METEOR_SETTINGS”, $settings, “Machine”)