1.0.2 • Published 5 years ago

alicloud-serverless-express v1.0.2

Weekly downloads
6
License
MIT
Repository
-
Last release
5 years ago

alicloud-serverless-express

Run serverless applications and REST APIs using your existing Node.js application framework, on top of AliCloud Function Compute and API Gateway

Getting Started

npm install alicloud-serverless-express
// index.js
const alicloudServerlessExpress = require('alicloud-serverless-express');
const app = require('./app');
const server = alicloudServerlessExpress.createServer(app);

exports.handler = (event, context, callback) =>{
    try{
        event = JSON.parse(event.toString());
    }catch(err){
        console.log('local event')
    }
    alicloudServerlessExpress.proxy(server, event, callback);
}

Quick Start/Example

Want to get up and running quickly? Check out example which includes:

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago