0.0.7 • Published 5 years ago
cdk-express v0.0.7
CDK Express
This project attempts to provide an express-like interface for defining api gateway integrations.
It uses CDK under the hood to generate a cloudformation stack..
Quickstart
yarn add cdk-express// app.ts
import * as cdx from 'cdk-express';
const app = cdx('myApp');
app.get('/item', './getItem');// ./getItem/index.js
exports.handler = (event, ctx) => {
return {
statusCode: 200,
body: 'Hello World',
headers: {
'Content-Type': 'text/html'
}
}
}{
"app": "npx ts-node app.ts"
}cdk deploy