-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebmachine
More file actions
executable file
·56 lines (48 loc) · 1.24 KB
/
Copy pathwebmachine
File metadata and controls
executable file
·56 lines (48 loc) · 1.24 KB
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
54
55
56
#!/usr/bin/env node
var log = console.log,
argv = require('optimist').argv,
webmachine = require('../lib/webmachine');
function logUsage() {
log('Usage:');
log(' webmachine file.js\n');
log('Options:');
log(' --port port [default 3000]');
// log(' --ipaddr ipaddr [default 0.0.0.0]');
// return log(' --log log [default none]');
};
webmachine.start((argv.port || 3000), (argv.ipaddr || '127.0.0.1'));
// if (argv._.length > 0) {
// if (argv._[0] === 'new') {
// if (argv._.length === 1) {
// logUsage();
// } else {
// systatic.clone(argv._[1], 'basic');
// }
// process.exit(0);
// }
// }
// if (argv.help || argv.h) {
// logUsage();
// process.exit(0);
// }
// if (!systatic.inProject('.')) {
// logUsage();
// process.exit(0);
// }
// var port = argv.port || 3000,
// ipaddr = argv.ipaddr || '0.0.0.0',
// logfile = argv.log;
// if (argv._.length > 0) {
// var phase = argv._[0];
// if (argv._[0] === 'test') {
// systatic.test(port, ipaddr, logfile);
// }
// else if (argv._[0] === 'phases') {
// systatic.printPhases();
// }
// else {
// systatic.runToPhase(phase);
// }
// } else {
// systatic.startServer(port, ipaddr, logfile);
// }