Skip to content

Instantly share code, notes, and snippets.

@nivertech
Forked from ThisIsMissEm/handler.js
Last active August 29, 2015 14:10
Show Gist options
  • Save nivertech/c9a742df9b465ece3c13 to your computer and use it in GitHub Desktop.
Save nivertech/c9a742df9b465ece3c13 to your computer and use it in GitHub Desktop.
var child_process = require('child_process');
exports.handler = function(event, context) {
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' });
proc.on('close', function(code){
if(code !== 0) {
return context.done(new Error("Process exited with non-zero status code"));
}
context.done(null);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment