mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
52 lines
859 B
JavaScript
Executable File
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 );
|