-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdpd
More file actions
executable file
·61 lines (45 loc) · 2.01 KB
/
dpd
File metadata and controls
executable file
·61 lines (45 loc) · 2.01 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
57
58
59
60
61
#!/usr/bin/env node
/**
* External dependencies
*/
var cli = require('../lib/cli');
cli.program
.version(require('../package').version)
.option('-m, --mongod [path]', 'path to mongod executable (defaults to `mongod`)')
.option('-p, --port [port]', 'port to host server (defaults to 2403)')
.option('-w, --wait', 'wait for input before exiting')
.option('-d, --dashboard', 'start the dashboard immediately')
.option('-o, --open', 'open in a browser')
.option('-e, --environment [env]', 'defaults to development')
.option('-H, --host [host]', 'specify host for mongo server')
.option('-P, --mongoPort [mongoPort]', 'mongodb port to connect to')
.option('-n, --dbname [dbname]', 'name of the mongo database')
.option('-a, --auth <auth>', ' usesrname:password mongo server credentials')
.option('-u, --username <username>', 'The user to authenticate as')
.option('-s, --password <password>', 'The user\'s password')
.option('-c, --dbconn <dbconnectionstring>', 'The MongoDB Connection String')
.option(' --deploydPath [deploydPath]', 'allow overriding the path to deployd main script');
cli.program
.command('create [project-name]')
.description('\tcreate a project in a new directory\n\teg. `dpd create my-app`')
.action(cli.create);
cli.program
.command('keygen')
.description('\tgenerate a key for remote access (./.dpd/keys.json)')
.action(cli.keygen);
cli.program
.command('showkey')
.description('\tshows current key for connecting to remote dashboard (./.dpd/keys.json)')
.action(cli.showkey);
cli.program
.command('*')
.description('\t[default] start the server in the current project in development mode\n' +
'\twith an interactive shell/repl for interacting with the running server\n' +
'\te.g. dpd (starts server in current directory),\n' +
'\t dpd my-app/app.dpd (starts app from file)')
.action(cli.start);
/**
* Parse the arguments
*/
cli.program.parse(process.argv);
if (cli.program.args.length === 0) cli.start();