{"id":24173136,"url":"https://github.com/anibalalpizar/api-stress","last_synced_at":"2026-03-01T14:02:50.670Z","repository":{"id":267585771,"uuid":"901668291","full_name":"anibalalpizar/api-stress","owner":"anibalalpizar","description":"🌩️ Middleware to simulate network conditions in APIs","archived":false,"fork":false,"pushed_at":"2024-12-11T07:51:43.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T19:12:58.150Z","etag":null,"topics":["api","express","http-errors","latency","middleware","nodejs","npm-package","packet-loss","resilience","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/api-stress","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/anibalalpizar.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T05:04:25.000Z","updated_at":"2024-12-11T07:55:35.000Z","dependencies_parsed_at":"2024-12-11T07:58:45.920Z","dependency_job_id":"f95f7106-bda8-4b8a-a1fb-7f854eab987e","html_url":"https://github.com/anibalalpizar/api-stress","commit_stats":null,"previous_names":["anibalalpizar/api-stress"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anibalalpizar/api-stress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibalalpizar%2Fapi-stress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibalalpizar%2Fapi-stress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibalalpizar%2Fapi-stress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibalalpizar%2Fapi-stress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anibalalpizar","download_url":"https://codeload.github.com/anibalalpizar/api-stress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibalalpizar%2Fapi-stress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","express","http-errors","latency","middleware","nodejs","npm-package","packet-loss","resilience","typescript"],"created_at":"2025-01-13T01:14:32.873Z","updated_at":"2026-03-01T14:02:50.645Z","avatar_url":"https://github.com/anibalalpizar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Storm Tester 🌩️\n\n## Overview 🌐\n\n`api-stress` is a middleware for simulating various network conditions in Node.js applications to test API resilience. It can simulate random network latency, packet loss, and HTTP errors.\n\n## Features ✨\n\n- Random network latency simulation\n- Packet loss simulation\n- HTTP error injection\n- Configurable network storm parameters\n\n## Installation 🔧\n\n```bash\nnpm install api-stress\n```\n\n## Usage 🚀\n\n```typescript\nimport express from \"express\";\nimport { StormMiddleware } from \"api-stress\";\n\nconst app = express();\n\n// Create Storm Middleware instance with aggressive network simulation\nconst stormMiddlewareInstance = new StormMiddleware({\n  delay: { min: 500, max: 2000 },\n  packetLoss: { rate: 10 },\n  errorSimulation: {\n    probability: 0.05,\n    statusCode: 500,\n    message: \"Simulated Internal Server Error\",\n  },\n});\n\n// Apply storm middleware to all routes\napp.use(stormMiddlewareInstance.middleware);\n\napp.get(\"/test\", (req, res) =\u003e {\n  res.json({\n    message: \"Survived the network storm!\",\n  });\n});\n```\n\n## Configuration Options ⚙️\n\n- `latency`: Simulate random network delays\n- `packetLoss`: Simulate percentage of dropped packets\n- `errorSimulation`: Inject random HTTP errors\n\n## License 📜\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## Contributing 🤝\n\nContributions are welcome! Feel free to submit a PR or open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanibalalpizar%2Fapi-stress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanibalalpizar%2Fapi-stress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanibalalpizar%2Fapi-stress/lists"}