New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-lambda-fastify

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-fastify - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

3

index.js

@@ -60,2 +60,5 @@ module.exports = (app, options) => (event, context, callback) => {

} else res.headers[h] = res.headers[h].join(',')
} else if (typeof res.headers[h] !== 'undefined' && typeof res.headers[h] !== 'string') {
// NOTE: API Gateway (i.e. HttpApi) validates all headers to be a string
res.headers[h] = res.headers[h].toString()
}

@@ -62,0 +65,0 @@ })

2

package.json

@@ -34,3 +34,3 @@ {

],
"version": "1.4.0",
"version": "1.4.1",
"main": "index.js",

@@ -37,0 +37,0 @@ "scripts": {

@@ -23,3 +23,3 @@ # Introduction

const awsLambdaFastify = require('aws-lambda-fastify')
const app = require('./app');
const app = require('./app')

@@ -30,9 +30,9 @@ const proxy = awsLambdaFastify(app)

exports.handler = proxy;
exports.handler = proxy
// or
// exports.handler = (event, context, callback) => proxy(event, context, callback);
// exports.handler = (event, context, callback) => proxy(event, context, callback)
// or
// exports.handler = (event, context) => proxy(event, context);
// exports.handler = (event, context) => proxy(event, context)
// or
// exports.handler = async (event, context) => proxy(event, context);
// exports.handler = async (event, context) => proxy(event, context)
```

@@ -43,6 +43,6 @@

```js
const fastify = require('fastify');
const fastify = require('fastify')
const app = fastify();
app.get('/', (request, reply) => reply.send({ hello: 'world' }));
const app = fastify()
app.get('/', (request, reply) => reply.send({ hello: 'world' }))

@@ -52,8 +52,8 @@ if (require.main === module) {

app.listen(3000, (err) => {
if (err) console.error(err);
console.log('server listening on 3000');
});
if (err) console.error(err)
console.log('server listening on 3000')
})
} else {
// required as a module => executed on aws lambda
module.exports = app;
module.exports = app
}

@@ -77,3 +77,3 @@ ```

const event = JSON.parse(decodeURIComponent(request.headers['x-apigateway-event']))
const context = JSON.parse(decodeURIComponent(request.headers['x-apigateway-context']))});
const context = JSON.parse(decodeURIComponent(request.headers['x-apigateway-context']))
// ...

@@ -80,0 +80,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc