]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blob - surfer.js
Add cli
[perso/Immae/Projets/Nodejs/Surfer.git] / surfer.js
1 #!/usr/bin/env node
2
3 'use strict';
4
5 var program = require('commander'),
6 actions = require('./src/actions');
7
8 // Allow self signed certs!
9 process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
10
11 program.version('0.1.0');
12
13 program.command('put')
14 .description('Put a file')
15 .action(actions.put);
16
17 program.command('get')
18 .description('Get a file or directory')
19 .action(actions.get);
20
21 program.command('del')
22 .description('Delete a file')
23 .action(actions.del);
24
25 program.parse(process.argv);