Gathering detailed insights and metrics for @silvermine/lambda-express
Gathering detailed insights and metrics for @silvermine/lambda-express
npm install @silvermine/lambda-express
Typescript
Module System
Node Version
NPM Version
76.3
Supply Chain
93.6
Quality
79.3
Maintenance
25
Vulnerability
100
License
TypeScript (99.04%)
JavaScript (0.96%)
Total Downloads
50,980
Last Day
26
Last Week
293
Last Month
1,355
Last Year
9,316
8 Stars
155 Commits
9 Forks
5 Watching
5 Branches
9 Contributors
Minified
Minified + Gzipped
Latest Version
0.3.1
Package Id
@silvermine/lambda-express@0.3.1
Unpacked Size
384.30 kB
Size
72.22 kB
File Count
127
NPM Version
8.5.5
Node Version
16.15.0
Publised On
09 Feb 2023
Cumulative downloads
Total Downloads
Last day
-69%
26
Compared to previous day
Last week
-19.3%
293
Compared to previous week
Last month
51.2%
1,355
Compared to previous month
Last year
8.5%
9,316
Compared to previous year
29
An express-like framework for use with AWS Lambda functions that supports both API Gateway and Application Load Balancer integrations with Lambda.
The entire library is written in TypeScript so you get great autocomplete if you're using VS Code or similar. It's also very well tested, so you can rest assured that it will do what you need, and regressions between versions will be rare.
You shouldn't have to think about how API Gateway or Application Load Balancer send you request events, or how you need to respond to them with your responses. There are a lot of little intricacies, especially if you are using API Gateway for some of your APIs and Application Load Balancer for others (see this writeup for the differences).
If you're writing APIs, you've probably already written Express apps, so keeping things familiar will accelerate your development, allowing you to focus on your business logic.
Here's a simple example to get you up and running quickly (assumes your execution environment is Node 12.x):
npm i @silvermine/lambda-express
npm i -D aws-lambda
1import { Application, Response, Request } from '@silvermine/lambda-express'; 2import { RequestEvent } from '@silvermine/lambda-express/dist/types/request-response-types'; 3import { NextCallback } from '@silvermine/lambda-express/dist/types/interfaces'; 4import { Context, Callback } from 'aws-lambda'; 5 6const app = new Application(); 7 8app.all('/*', (_request: Request, response: Response, next: NextCallback) => { 9 response.set('Access-Control-Allow-Origin', '*'); 10 next(); 11}); 12 13app.options('/*', (_request: Request, response: Response) => { 14 response.set('Access-Control-Allow-Methods', 'OPTIONS,GET') 15 .set('Access-Control-Allow-Credentials', 'false'); 16 response.send(''); 17}); 18 19app.get('/my-endpoint', async (request: Request, response: Response) => { 20 response.send('Hello world!'); 21}); 22 23export const handler = (event: RequestEvent, context: Context, callback: Callback): void => { 24 app.run(event, context, callback); 25}; 26 27export default handler;
At this point you should be able to compile, bundle, and deploy this Lambda. Assuming you have configured APIGW or ALB to forward traffic to your Lambda, you will now have a very basic working API!
This software is released under the MIT license. See the license file for more details.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 11/12 approved changesets -- score normalized to 9
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More