alicloud-serverless-express
v1.0.2
Published
Run serverless applications and REST APIs using your existing Node.js application framework, on top of AliCloud Function Compute and API Gateway
Downloads
59
Maintainers
Readme
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: