Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active June 1, 2017 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/4b62cd1893951c9fa7bd764100df3616 to your computer and use it in GitHub Desktop.
Save kunigami/4b62cd1893951c9fa7bd764100df3616 to your computer and use it in GitHub Desktop.
...
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end(htmlFile);
// Take a screenshot asynchronously
var handler = function(erro, stdout, stderr) {
console.log(stdout);
}
exec('./snapshot.sh', handler);
}).listen(3000, "127.0.0.1");
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment