Created
November 6, 2014 21:47
-
-
Save lukevers/568a729aa587c3e03cf8 to your computer and use it in GitHub Desktop.
nodejs load aws config from .env.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('aws', function() { | |
require('child_process').exec( | |
'php -r \'print json_encode(include(".env.php"));\'', | |
function (err, stdout, stderr) { | |
aws = JSON.parse(stdout).AWS; | |
// Now we have the following structure: | |
// | |
// { | |
// cdn: '', | |
// key: '', | |
// secret: '', | |
// region: '', | |
// bucket: '', | |
// folder: '' | |
// } | |
// | |
// | |
console.log(aws); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment