2015-07-26 14:11:34 -07:00

52 lines
859 B
JavaScript
Executable File

#!/usr/bin/env node
var JAWS = require('../lib/main.js');
var program = require('commander');
var shortid = require('shortid');
/**
* Deploy
* - Deploys the Lambda Function to AWS Lambda
*/
program
.version(JAWS.version)
.command( 'deploy' )
.description( 'Deploy your application to Amazon Lambda' )
.action( function( prg ) {
JAWS.deploy( prg );
});
/**
* Run
* - Runs the Lambda Function locally
*/
program
.version( JAWS.version )
.command( 'run' )
.description( 'Run your Amazon Lambda application locally' )
.action( function( prg ) {
JAWS.run( prg );
});
/**
* Server
* - Starts the webserver for the application
*/
program
.version( JAWS.version )
.command( 'server' )
.description( 'Start your server' )
.action( function( prg ) {
JAWS.server( prg );
});
program.parse( process.argv );