Created
November 23, 2010 07:02
-
-
Save aikar/711387 to your computer and use it in GitHub Desktop.
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 | |
//CLI Script for starting apps | |
var args = process.argv, | |
exec = require('child_process').exec, | |
util = require('util'), | |
daemonize = require('fork').daemonize; | |
if(args[2] == 'start' && args[3]) | |
{ | |
require('./app/' + args[3]); | |
//var cmd = 'nohup node app/' + args[3] + '/index.js &' | |
//console.log(cmd); | |
//exec(cmd); | |
} | |
daemonize(); | |
//var x = process.openStdin(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment