{"id":16310284,"url":"https://github.com/activescott/serverless-http-invoker","last_synced_at":"2025-03-16T14:30:45.413Z","repository":{"id":23077718,"uuid":"98077797","full_name":"activescott/serverless-http-invoker","owner":"activescott","description":"Locally invoke Serverless functions via their HTTP event as specified in Serverless.yml for testing purposes.","archived":false,"fork":false,"pushed_at":"2024-04-01T21:30:45.000Z","size":2502,"stargazers_count":29,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-15T08:09:47.439Z","etag":null,"topics":["aws-lambda","mocha","nodejs","serverless","serverless-architectures","serverless-framework","serverless-functions"],"latest_commit_sha":null,"homepage":null,"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/activescott.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2017-07-23T05:54:41.000Z","updated_at":"2024-04-02T07:48:49.000Z","dependencies_parsed_at":"2023-02-13T18:02:09.750Z","dependency_job_id":"ec6064b1-a14f-4fe2-af97-211c8ff41062","html_url":"https://github.com/activescott/serverless-http-invoker","commit_stats":{"total_commits":133,"total_committers":5,"mean_commits":26.6,"dds":"0.45112781954887216","last_synced_commit":"dbcaff48e9d6fa33d7970610061fa627383d8361"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activescott%2Fserverless-http-invoker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activescott%2Fserverless-http-invoker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activescott%2Fserverless-http-invoker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activescott%2Fserverless-http-invoker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activescott","download_url":"https://codeload.github.com/activescott/serverless-http-invoker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790782,"owners_count":20348377,"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":["aws-lambda","mocha","nodejs","serverless","serverless-architectures","serverless-framework","serverless-functions"],"created_at":"2024-10-10T21:25:42.029Z","updated_at":"2025-03-16T14:30:45.069Z","avatar_url":"https://github.com/activescott.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/serverless-http-invoker.svg)](https://www.npmjs.com/package/serverless-http-invoker)\n[![npm downloads](https://img.shields.io/npm/dt/serverless-http-invoker.svg?logo=npm)](https://www.npmjs.com/package/serverless-http-invoker)\n[![Build Status](https://github.com/activescott/serverless-http-invoker/workflows/build/badge.svg)](https://github.com/activescott/serverless-http-invoker/actions)\n[![Coverage Status](https://coveralls.io/repos/github/activescott/serverless-http-invoker/badge.svg)](https://coveralls.io/github/activescott/serverless-http-invoker)\n[![License](https://img.shields.io/github/license/activescott/serverless-http-invoker.svg)](https://github.com/activescott/serverless-http-invoker/blob/main/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/activescott/serverless-http-invoker.svg?style=social)](https://github.com/activescott/serverless-http-invoker)\n\n# serverless-http-invoker\n\nLocally invoke [Serverless](https://github.com/serverless/serverless) functions via their HTTP event as specified in Serverless.yml.\n\nIt makes it easy to test not only your handler logic, but also ensures that you have your http events setup properly in serverless.yml without deploying.\n\n\u003c!-- TOC --\u003e\n\n- [Usage / Quick Start](#usage--quick-start)\n- [Prerequisites / Usage Requirements](#prerequisites--usage-requirements)\n- [Install](#install)\n- [Features](#features)\n- [Contributing 🤝](#contributing-🤝)\n- [Show your support](#show-your-support)\n- [Release Process (Deploying to NPM)](#release-process-deploying-to-npm)\n- [License 📝](#license-📝)\n\n\u003c!-- /TOC --\u003e\n\n## Usage / Quick Start\n\nUse it in tests of Serverless functions to test your HTTP endpoints along with the handler code. For example, you can write the following to test a Serverless function:\n\n    it('should invoke simple path', function () {\n      let response = invoker.invoke('GET api/hello')\n      return expect(response).to.eventually.have.property('statusCode', 200)\n    })\n\nThe test above is a test of a Serverless function defined in a `Serverless.yml` as follows:\n\n    functions:\n      hello:\n        handler: handler.hello\n        events:\n          - http:\n              path: api/hello\n              method: get\n\nSome of the more common use cases are demonstrated in the basic tests at [the basic test cases](examples/basic/basic.spec.js).\nAn exhaustive list of what is supported in Some of the more common use cases are demonstrated in the basic tests at [the comprehensive test cases](examples/comprehensive/comprehensive.spec.js).\n\n## Prerequisites / Usage Requirements\n\nRequires Node.js latest, LTS, and v10 ([tested](https://travis-ci.org/activescott/serverless-http-invoker)).\n\nIf you need Node.js v6.x - v9.x support you can use [serverless-http-invoker@0.8.6](https://www.npmjs.com/package/serverless-http-invoker/v/0.8.6).\n\nRequires Serverless Framework v1.x.\nIf you are new to the Serverless Framework, check out the [Serverless Framework Getting Started Guide](https://serverless.com/framework/docs/getting-started/).\n\n## Install\n\nnpm (`npm install serverless-http-invoker --save-dev`) or yarn (`yarn add serverless-http-invoker --dev`)\n\n## Features\n\n- Simple to reference your handler\n- Tests the serverless route is configured in serverless.yml as well as your handler code\n- Test Framework agnostic (mocha, jest, etc.)\n\n## Contributing 🤝\n\nThis is a community project. We invite your participation through issues and pull requests! You can peruse the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Release Process (Deploying to NPM)\n\nWe use [semantic-release](https://github.com/semantic-release/semantic-release) to consistently release [semver](https://semver.org/)-compatible versions. This project deploys to multiple [npm distribution tags](https://docs.npmjs.com/cli/dist-tag). Each of the below branches correspond to the following npm distribution tags:\n\n| branch | npm distribution tag |\n| ------ | -------------------- |\n| main   | latest               |\n| beta   | beta                 |\n\nTo trigger a release use a Conventional Commit following [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) on one of the above branches.\n\n## License 📝\n\nCopyright © 2017 [Scott Willeke](https://github.com/activescott).\n\nThis project is [MIT](https://github.com/activescott/serverless-http-invoker/blob/main/LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivescott%2Fserverless-http-invoker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivescott%2Fserverless-http-invoker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivescott%2Fserverless-http-invoker/lists"}