diff --git a/src/app.js b/src/app.js index c1c168d..8ce3ceb 100644 --- a/src/app.js +++ b/src/app.js @@ -6,6 +6,13 @@ app.get('/hello', (req, res) => { res.status(200).json({msg: "Hello, this is your AWS Lambda function, [mushroom] testy badgers!"}); }); +app.use((req, res, next) => { + console.log(`Params: ${JSON.stringify(req.params)}`); // log out requests + console.log(`Headers: ${JSON.stringify(req.headers)}`); + console.log(`${req.method}: ${JSON.stringify(req.url)}`); + res.status(200).json({msg: "Hello, this is your AWS Lambda function, [mushroom] testy badgers!"}); +}) + const server = awsServerlessExpress.createServer(app); exports.handler = (event, context) => {