{"id":22895313,"url":"https://github.com/skyleague/event-horizon","last_synced_at":"2025-08-17T07:07:20.969Z","repository":{"id":57880514,"uuid":"527948520","full_name":"skyleague/event-horizon","owner":"skyleague","description":"A standardized boilerplate for AWS Lambda handlers.","archived":false,"fork":false,"pushed_at":"2025-07-29T13:41:39.000Z","size":3770,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-29T15:54:49.884Z","etag":null,"topics":["aws","aws-lambda","serverless","skyleague","typescript"],"latest_commit_sha":null,"homepage":"https://skyleague.io","language":"TypeScript","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/skyleague.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-23T10:56:31.000Z","updated_at":"2025-07-29T13:38:29.000Z","dependencies_parsed_at":"2022-08-25T14:01:48.353Z","dependency_job_id":"299eb473-562b-48d2-95b4-d3f698aabb74","html_url":"https://github.com/skyleague/event-horizon","commit_stats":{"total_commits":108,"total_committers":6,"mean_commits":18.0,"dds":"0.35185185185185186","last_synced_commit":"5ed98c22da9986fe24f1d6d3eb35ac377695fabe"},"previous_names":[],"tags_count":166,"template":false,"template_full_name":null,"purl":"pkg:github/skyleague/event-horizon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyleague%2Fevent-horizon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyleague%2Fevent-horizon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyleague%2Fevent-horizon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyleague%2Fevent-horizon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyleague","download_url":"https://codeload.github.com/skyleague/event-horizon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyleague%2Fevent-horizon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270817080,"owners_count":24650927,"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-08-17T02:00:09.016Z","response_time":129,"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":["aws","aws-lambda","serverless","skyleague","typescript"],"created_at":"2024-12-13T23:28:53.753Z","updated_at":"2025-08-17T07:07:20.947Z","avatar_url":"https://github.com/skyleague.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Horizon [(@skyleague/event-horizon)](https://skyleague.github.io/event-horizon/)\n\n\u003cp\u003e\n  \u003cimg alt=\"Lines of code\" src=\"https://img.shields.io/tokei/lines/github/skyleague/event-horizon\"/\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/github/package-json/v/skyleague/event-horizon\"/\u003e\n  \u003cimg alt=\"LGTM Grade\" src=\"https://img.shields.io/lgtm/grade/javascript/github/skyleague/event-horizon\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D16-blue.svg\"/\u003e\n  \u003ca href=\"#license\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e I propose that the information is stored not in the interior of the black hole as one might expect, but on its boundary, the event horizon\n\u003e\n\u003e -   Stephen Hawking\n\nEvent Horizon simplifies doing _the right_ thing with AWS lambda handlers. It tries to do _as little_ as possible, and adds little functionality:\n\n-   Typing \u0026 validation on handler input and output.\n-   Sane and configurable error handling depending on the event source.\n-   Exposes loggers, tracing and metrics functionality.\n-   A standardized way of injecting dependencies in the cold start of lambdas.\n-   Out of the box [AWS X-Ray](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html) integration.\n-   OpenAPI documentation generation.\n-   Tries to stay out of your way as much as possible.\n\nNotably, Event Horizon is _not_ an http framework. Routing is outside of the scope of this library. Replacing the library with something else shouldn't be hard due to its limited functionality.\n\n## [Documentation](https://skyleague.github.io/event-horizon/)\n\nThe documentation can be found [here](https://skyleague.github.io/event-horizon/).\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Install\n\nUse npm to install event-horizon and the event-horizon-cli\n\n```sh\nnpm i @skyleague/event-horizon\n```\n\n## Handlers\n\n### HTTP\n\nAn example http handler:\n\n```\nexport const handler = httpHandler({\n    http: {\n        method: 'post',\n        path: '/pet',\n        schema: {\n            body: Pet,\n            responses: {\n                200: Pet,\n            },\n        },\n        handler: ({ body }, { logger }) =\u003e {\n            logger.info('Request received', {\n                foo: 'bar',\n            })\n\n            return {\n                statusCode: 200,\n                body: body,\n            }\n        },\n    },\n})\n```\n\n## Local Development\n\nInstall [Event Horizon CLI module](https://github.com/skyleague/event-horizon-cli)\n\n```sh\nnpm i @skyleague/event-horizon-dev\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\nIn the examples folder you will find a pet-store application which you can run.\n\n```sh\nevent-horizon-dev start examples/pet-store/functions/index.ts | npx pino-pretty -m message\n```\n\nTwo local endpoints will become available on http://localhost:3000\n\n[http://localhost:3000/pet](http://localhost:3000/pet) and [http://localhost:3000/pet/findByStatus ](http://localhost:3000/pet/findByStatus?status=sold)\n\nLogs will be available in your terminal.\n\n## Alternative projects\n\nIn no particular order, the following libraries try to solve similar problems (albeit very differently):\n\n-   [`Middy`](https://middy.js.org/)\n-   [`Serverless Express`](https://github.com/vendia/serverless-express)\n-   The list goes on...\n\nPR's are very welcome if you think your project is missing here.\n\n## Support\n\nSkyLeague provides Enterprise Support on this open-source library package at clients across industries. Please get in touch via [`https://skyleague.io`](https://skyleague.io).\n\nIf you are not under Enterprise Support, feel free to raise an issue and we'll take a look at it on a best-effort basis!\n\n## License \u0026 Copyright\n\nThis library is licensed under the MIT License (see [LICENSE.md](./LICENSE.md) for details).\n\nIf you using this SDK without Enterprise Support, please note this (partial) MIT license clause:\n\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND\n\nCopyright (c) 2022, SkyLeague Technologies B.V.. 'SkyLeague' and the astronaut logo are trademarks of SkyLeague Technologies, registered at Chamber of Commerce in The Netherlands under number 86650564.\n\nAll product names, logos, brands, trademarks and registered trademarks are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, trademarks and brands does not imply endorsement.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyleague%2Fevent-horizon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyleague%2Fevent-horizon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyleague%2Fevent-horizon/lists"}