qwebs-aws-api-gateway
v0.0.33
Published
Qwebs routing for AWS API Gateway
Downloads
13
Readme
qwebs-aws-api-gateway
Qwebs routing for AWS API Gateway
const path = require("path");
const QwebsAwsApiGateway = require('qwebs-aws-api-gateway');
const instance = QwebsAwsApiGateway.create({
dirname: path.resolve(__dirname, ".."),
config: {
routes: "./routes.json"
}
});
module.exports.handler = (event, context, callback) => {
return instance.then(qwebs => {
return qwebs.invoke(event, context, callback);
}).catch(error => {
callback(null, { statusCode: error.statusCode || 404 })
})
};