Last active
August 29, 2015 14:20
-
-
Save gavinengel/98c069197baf6a55dd2b to your computer and use it in GitHub Desktop.
daemonic: wrapper stub for turning a normall shell command into a node.js daemon
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
#!/usr/bin/env node | |
// source: https://gist.github.com/gavinengel/98c069197baf6a55dd2b | |
// example usage: $ pm2 start jade-watch.js; | |
var shelld = 'jade -w index.jade' // EDIT ONLY THIS LINE | |
var terminal = require('oh-my-terminal') | |
terminal.exec(shelld, function(err, stdout, stderr) { | |
if(err) console.log(err) | |
else console.log(stdout) + console.log(stderr) ; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment