{"id":16149261,"url":"https://github.com/djgrant/aws-lambda-express","last_synced_at":"2025-04-06T21:41:52.516Z","repository":{"id":150475419,"uuid":"127888605","full_name":"djgrant/aws-lambda-express","owner":"djgrant","description":"Express style routing for AWS lambda","archived":false,"fork":false,"pushed_at":"2018-04-03T17:08:00.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-13T03:42:36.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djgrant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-03T10:03:15.000Z","updated_at":"2018-04-03T17:08:01.000Z","dependencies_parsed_at":"2023-04-25T23:01:48.794Z","dependency_job_id":null,"html_url":"https://github.com/djgrant/aws-lambda-express","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djgrant%2Faws-lambda-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djgrant%2Faws-lambda-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djgrant%2Faws-lambda-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djgrant%2Faws-lambda-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djgrant","download_url":"https://codeload.github.com/djgrant/aws-lambda-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557797,"owners_count":20958047,"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","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-10-10T00:38:07.124Z","updated_at":"2025-04-06T21:41:52.489Z","avatar_url":"https://github.com/djgrant.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-lambda-express\n\nExpress style routing for AWS Lambda.\n\nThe library provides a similar API to Express, with the difference of being backed by Lambda's event and context objects, rather than the HTTP module.\n\n## Installation\n\nThe project is still a WIP so I have not published to NPM yet.\n\n## Usage\n\n```js\nconst Router = require(\"aws-lambda-express\");\n\nconst router = new Router();\n\nrouter.use((req, res, next) =\u003e {\n  console.log(req.event);\n  console.log(req.context);\n  next();\n});\n\nrouter.use(\"/some/route\", (req, res, next) =\u003e {\n  res\n    .set({ \"my-header\": \"hello\" })\n    .status(200)\n    .send(\"Hello world\");\n});\n\nconst handler = (event, context, cb) =\u003e {\n  router\n    .handle(event, context)\n    .then(response =\u003e {\n      cb(null, {\n        body: response.body,\n        headers: response.headers,\n        statusCode: response.statusCode\n      });\n    })\n    .catch(err) =\u003e {\n      cb(err);\n    });\n};\n\nmodule.exports = handler;\n```\n\n## API\n\nFor now, please refer to the tests in [test/router.test.js](./test/router.test.js) for a complete API reference.\n\n## Todo\n\n* [] HTTP methods\n* [] Docs\n* [] Publish to NPM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjgrant%2Faws-lambda-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjgrant%2Faws-lambda-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjgrant%2Faws-lambda-express/lists"}