forked from sshirokov/PoopVolcano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
executable file
·46 lines (38 loc) · 994 Bytes
/
app.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
#!/usr/bin/env node
(function() {require('./lib');})(); //Loader scaffold
var options = {
repl: {
note: 'Open a REPL into the app',
value: false
},
data: {
note: "Data dir root",
value: "{0}/data".$format(process.cwd())
},
consumer_key: {
note: "Twitter consumer key"
},
consumer_secret: {
note: "Twitter secret key"
},
access_token_key: {
note: "Twitter access key"
},
access_token_secret: {
note: "Twitter secret key"
}
};
var keys = require('helpers/path').readJSON('.keys.json') || {};
for(op in keys) {
if(!keys.hasOwnProperty(op)) continue;
if(options[op]) options[op].value = keys[op];
}
var opts = require('tav').set(
options,
"Usage: {self} [options]".$format({self: require('helpers').proc.$0()}),
true // Panic on unknown options
);
//Boot
var PoopVolcano = require('poopvolcano'),
poop = new PoopVolcano();
if(opts.repl) poop.repl.open();