-
Notifications
You must be signed in to change notification settings - Fork 0
/
mudsmith.js
53 lines (47 loc) · 1.19 KB
/
mudsmith.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* Mudsmith - The most awesome Node.js server monitoring system.
*
* @author Pierce Moore <Pierce@PierceMoore.com>
* @copyright 2013 Zngine
* @license MIT
*/
var io = require('socket.io')
, fs = require('fs')
, path = require('path')
, os = require('os')
, EventEmitter = require('events').EventEmitter
/**
* External Libraries
*/
, async = require('async')
, underscore = require('underscore')._
, jake = require('jake')
, scli = require('supercli')
, Handlebars = require('handlebars')
, uglifyjs = require('uglify-js')
, optimist = require('optimist')
, argv = require('optimist')
.usage('Deploy your application to all your servers and monitor their health')
.alias('h', 'help')
.describe('h', 'Show this usage information')
.default('h', false)
.boolean('h')
.argv
/**
* Paths, vars, constants
*/
, __basedir = process.cwd()
;
/**
* First we read in our config files and set them global
*/
GLOBAL._mudsmith = {
servers : require('./config/servers.js'),
commands : require('./config/commands.js'),
config : require('./config/config.js')
}
/**
* Now we parse our command line options
*/
if(argv.help)
optimist.showHelp()