1 | #!/usr/bin/env node
|
2 |
|
3 | var
|
4 | dotenv = require( "dotenv" ),
|
5 | lambda = require( "../lib/main.js" ),
|
6 | program = require( "commander" );
|
7 |
|
8 | dotenv.load( );
|
9 |
|
10 | program
|
11 | .usage('deploy <file>')
|
12 | .command( "deploy <file>" )
|
13 | .description( "Deploy your application to Amazon Lambda" )
|
14 | .action( function( prg, options ) {
|
15 | lambda.deploy( prg );
|
16 | } );
|
17 |
|
18 | program
|
19 | .usage('delete <file>')
|
20 | .command( "delete <file>" )
|
21 | .description( "Delete Function" )
|
22 | .action( function( prg ) {
|
23 | lambda.delete( prg );
|
24 | });
|
25 |
|
26 | program
|
27 | .usage('invoke <file>')
|
28 | .command( "invoke <file>" )
|
29 | .description( "Invoke Function" )
|
30 | .action( function( prg ) {
|
31 | lambda.invoke( prg );
|
32 | });
|
33 |
|
34 | program
|
35 | .usage('start <file>')
|
36 | .command( "start <file>" )
|
37 | .description( "start Function" )
|
38 | .action( function( prg ) {
|
39 | lambda.start( prg );
|
40 | });
|
41 |
|
42 | program.parse( process.argv );
|