Skip to content

Commit

Permalink
code lib change
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispsheehan committed Jan 11, 2024
1 parent 9a11c43 commit 41a75d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 53 deletions.
9 changes: 3 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
const express = require('express');
const awsServerlessExpress = require('aws-serverless-express');
const serverless = require('serverless-http');

const app = express();

app.get('/hello', (req, res) => {
res.send('Hello, this is your AWS Lambda function!');
});

const server = awsServerlessExpress.createServer(app);

exports.handler = (event, context) => {
awsServerlessExpress.proxy(server, event, context);
};
module.exports.handler = serverless(app);
55 changes: 10 additions & 45 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"aws-serverless-express": "^3.4.0",
"express": "^4.18.2"
"express": "^4.18.2",
"serverless-http": "^3.2.0"
}
}

0 comments on commit 41a75d8

Please sign in to comment.