qwebs-aws-api-gateway

0.0.33 • Public • Published

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 })
    })
};
 

Others AWS Services

/qwebs-aws-api-gateway/

    Package Sidebar

    Install

    npm i qwebs-aws-api-gateway

    Weekly Downloads

    2

    Version

    0.0.33

    License

    MIT

    Last publish

    Collaborators

    • benoit.claveau