{"id":22392796,"url":"https://github.com/mikestaub/serverless-express","last_synced_at":"2025-10-08T21:38:58.007Z","repository":{"id":9392607,"uuid":"61977240","full_name":"mikestaub/serverless-express","owner":"mikestaub","description":"Run your unmodified express app on AWS Lambda via the Serverless framework.","archived":false,"fork":false,"pushed_at":"2023-10-10T00:19:19.000Z","size":1375,"stargazers_count":151,"open_issues_count":16,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-22T01:48:36.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikestaub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-26T06:41:51.000Z","updated_at":"2024-11-02T00:31:45.000Z","dependencies_parsed_at":"2024-01-03T02:24:44.734Z","dependency_job_id":"6ab3645f-e6e8-4bee-94ad-c236694aff43","html_url":"https://github.com/mikestaub/serverless-express","commit_stats":{"total_commits":72,"total_committers":7,"mean_commits":"10.285714285714286","dds":0.3472222222222222,"last_synced_commit":"1f203ca41b3507165acd15c1eb7538419db1781e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mikestaub/serverless-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestaub%2Fserverless-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestaub%2Fserverless-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestaub%2Fserverless-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestaub%2Fserverless-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikestaub","download_url":"https://codeload.github.com/mikestaub/serverless-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestaub%2Fserverless-express/sbom","scorecard":{"id":646036,"data":{"date":"2025-08-11","repo":{"name":"github.com/mikestaub/serverless-express","commit":"2be278be67a3a294a6de52fdc184b573d8366b28"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":6,"reason":"Found 2/3 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"51 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-675m-85rw-j3w4","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-6394-6h9h-cfjg","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T12:10:11.185Z","repository_id":9392607,"created_at":"2025-08-21T12:10:11.185Z","updated_at":"2025-08-21T12:10:11.185Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278404233,"owners_count":25981246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T04:18:29.125Z","updated_at":"2025-10-08T21:38:57.988Z","avatar_url":"https://github.com/mikestaub.png","language":"JavaScript","funding_links":[],"categories":["Projects"],"sub_categories":[],"readme":"# :package: :sparkles: Serverless Express Plugin\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com) \n[![npm version](https://badge.fury.io/js/serverless-express.svg)](https://badge.fury.io/js/serverless-express)\n[![Coverage Status](https://coveralls.io/repos/github/iliasbhal/serverless-express/badge.svg?branch=master)](https://coveralls.io/github/iliasbhal/serverless-express?branch=master)\n[![GitHub license](https://img.shields.io/badge/licence-MIT-brightgreen.svg)](https://github.com/iliasbhal/serverless-express/blob/master/LICENSE)\n\n\nMake express apps compatible with serverless framework. \nEnsure compatibility with serverless-offline plugin.\n\nWorks with provider :\n  - [x] **Amazon Web Service - Lambda**\n  - [x] **Google Cloud Platform - Cloud functions**\n  - [x] **Microsoft Azure - Cloud functions**\n\n## Download\nType this command inside your terminal\n```\nnpm install --save serverless-express\n```\n\nor for yarn users\n```\nyarn add serverless-express\n```\n\n## Installation\n\n### 1 - Add it to your serverless.yml\n\ninside your project's serverless.yml file add ```serverless-express``` to the plugin list inside serverless.yml\n\nIt should look something like this:\n```YAML\nplugins:\n  - serverless-foo # \u003c- fake name\n  - serverless-express # \u003c- like so\n```\n\n*NB: In order to automatically know on which provider the function is executed, \nthe plugin asks serverless to set ```SERVERLESS_EXPRESS_PLATFORM``` as an environment variable. The plugin uses it internally*\n\n### 2 - Use serverless-express/express\n\nIn the head of your express app file :\n- Replace `require('express')` by `require('serverless-express/express')`\n- Make you app exportable\n\nit should look like this:\n```js\n// const express = require('express');\nconst express = require('serverless-express/express')\nvar app = express();\n\n\n// Q: What is serverless-express/express ??\n//\n// A: It's express, the exact same express that you already use.\n//    We wrapped it and we abstracted away all specific implementation \n//    that has to be done in order to work properly on every provider.\n//\n//    Basicaly, we just made express development provider agnostic\n//    so you can develop your app without any vendor lock-in, yeah !\n\n\n// --- example code ---\n//\n// app.get('/some_url', doSomething() )\n// app.post('/other_url', doSomethingElse() )\n//\n// ------- end --------\n\nmodule.exports = app\n// app.listen(PORT, ()=\u003e{\n//   console.log('listening')  \n// })\n\n```\n\n\n### 3 - In your handler file\ninside the handler file, you have to import ```serverless-express/handler``` and call it with your express app.\nIt should look something like this:\n\n```js\n\nconst handler = require('serverless-express/handler')\nconst app = require('path/to/your/express/app')\n\nmodule.exports.api = handler(app)\n// that's it ;)\n```\n\n### 4 - Finished !\n\nNow that everything is done, you can get back to work and enjoy serverless and express in the same time ;)\n\n## Usage\nMake sure that you register an HTTP event for each endpoint of your express app.\nFor example, if you register an endpoint like this one: \n```js\n  app.get( '/users' , showUsers )\n```\n\nYou will need to make sure that your cloud provider routes the HTTP call to your app. In order to do so, you will need to update your serverless.yml like so :\n```yml\n# like this \nfunctions:\n  app: \n    handler: handler.handler  #assuming your handler file is handler.js\n    events: \n      - http:\n          method: GET\n          path: /users\n\n# or like this\n# be careful, this will route every HTTP event to your function.\nfunctions:\n  app:\n    handler: handler.handler \n    events: \n      - http:\n          method: ANY   \n          path: /{proxy+}\n```\n\n\n\n\n\n\n### Todo \n\n- [ ] create \"serverless express yaml\" command that updates the serverless.yml file with all the endpoints of the express app\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikestaub%2Fserverless-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikestaub%2Fserverless-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikestaub%2Fserverless-express/lists"}