bragg-cloudwatch-log
bragg Bragg middleware to process CloudWatch Logs events
Install
$ npm install bragg-cloudwatch-log
Usage
All the events will be routed to post
cloudwatch:log
. You can use that route to handle the CloudWatch log events.
const app = require('bragg')();
const router = require('bragg-router')();
const cloudWatchLog = require('bragg-cloudwatch-log');
router.post('cloudwatch:log', ctx => {
console.log(ctx.request.body)
});
app.use(cloudWatchLog());
app.use(router.routes());
exports.handler = app.listen();
API
cloudWatchLog()
Add the bragg CloudWatch Log middleware to the middleware pipeline.
License
MIT © Simon