{"id":14989551,"url":"https://github.com/shipengqi/sactive-web","last_synced_at":"2025-08-20T06:32:20.604Z","repository":{"id":33011626,"uuid":"136029187","full_name":"shipengqi/sactive-web","owner":"shipengqi","description":":rocket: A dependency injection web framework for Node.js. ","archived":false,"fork":false,"pushed_at":"2023-01-23T20:43:19.000Z","size":1683,"stargazers_count":139,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T11:01:45.381Z","etag":null,"topics":["dependency-injection","koa","koa-router","koa2","webframework"],"latest_commit_sha":null,"homepage":"https://shipengqi.github.io/sactive-web","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/shipengqi.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}},"created_at":"2018-06-04T13:27:43.000Z","updated_at":"2024-04-19T01:45:43.000Z","dependencies_parsed_at":"2023-02-13T03:00:39.037Z","dependency_job_id":null,"html_url":"https://github.com/shipengqi/sactive-web","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shipengqi/sactive-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fsactive-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fsactive-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fsactive-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fsactive-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipengqi","download_url":"https://codeload.github.com/shipengqi/sactive-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fsactive-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271278778,"owners_count":24731899,"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-20T02:00:09.606Z","response_time":69,"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":["dependency-injection","koa","koa-router","koa2","webframework"],"created_at":"2024-09-24T14:18:33.239Z","updated_at":"2025-08-20T06:32:20.279Z","avatar_url":"https://github.com/shipengqi.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e\n  SActive Web\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n  :rocket: A dependency injection web framework for Node.js.\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.travis-ci.org/shipengqi/sactive-web\"\u003e\n    \u003cimg alt=\"Build Status\" src=\"https://img.shields.io/travis/shipengqi/sactive-web/master.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/shipengqi/sactive-web\"\u003e\n    \u003cimg alt=\"Build Status\" src=\"https://img.shields.io/codecov/c/github/shipengqi/sactive-web.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://nodejs.org/download/\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/node/v/sactive-web.svg?style=flat-square\"\u003e\n  \u003c/a\u003e  \n  \u003ca href=\"https://www.npmjs.com/package/sactive-web\"\u003e\n    \u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/sactive-web.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/sactive-web\"\u003e\n    \u003cimg alt=\"NPM Download\" src=\"https://img.shields.io/npm/dw/sactive-web.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/shipengqi/sactive-web/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"http://img.shields.io/npm/l/sactive-web.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## Installation\n```bash\nnpm install sactive-web\n```\n\n\u003e **Note that 3.x.x is not compatible with 2.x.x and below** !!!\n\n## Features\n\n- Dependency injection.\n- Router, grouping routes, based on [koa-router](https://github.com/alexmingoia/koa-router).\n- Interceptors.\n- Based on [Koa2](https://github.com/koajs/koa).\n\n## Example\n\n```javascript\nconst App = require('..');\n\nconst app = new App();\napp.bindAny('name', 'pooky');\n\napp.use(($ctx, $name, $next) =\u003e {\n  $ctx.testname1 = $name;\n  $next();\n});\n\napp.group('v1')\n  .get('/users/:name', ($ctx, $next, $name) =\u003e {\n    $ctx.body = {'name': $ctx.params.name, 'testname1': $ctx.testname1, 'testname2': $name};\n  });\napp.group('v2/')\n  .get('/users/:name', ($name, $ctx, $next) =\u003e {\n    $ctx.response.body = {'name': $ctx.params.name, 'testname1': $ctx.testname1, 'testname2': $name};\n  });\napp.group('/v3/')\n  .get('/users/:name', ($ctx, $name, $next) =\u003e {\n    $ctx.body = {'name': $ctx.params.name, 'testname1': $ctx.testname1, 'testname2': $name};\n  });\n\napp.listen(8080);\n```\n\n## Documentation\n- [Usage Guide](./docs/README.md) \n- [API Reference](./docs/api.md) \n\n\n## Babel setup\nIf you're not using `node v7.6+`, you can refer [koa installation](https://koajs.com/#introduction).\n\n## Debugging\nsactive-web along with many of the libraries it's built with support the __DEBUG__ environment variable from [debug](https://github.com/visionmedia/debug) which provides simple conditional logging.\n\nFor example\nto see all sactive-web debugging information just pass `DEBUG=active:*` and upon boot you'll see the list of middleware used, among other things.\n```bash\n  active:di bind class: injector, singleton: true +0ms\n  active:di bind any: age, singleton: true +1ms\n  active:application use - +0ms\n  active:application use - +0ms\n  active:application register get /users/:name +1ms\n  active:application register get /users/ +0ms\n  active:application use - +0ms\n  active:di bind any: address, singleton: true +3ms\n  active:di bind function: getAddress, singleton: true +1ms\n  active:application listen +1ms\n```\n\n## Tests\nInstall the dependencies, then run `npm test`:\n``` bash\nnpm install\nnpm test\n\n# coverage\nnpm run test:cov\n```\n\n## TODO\n- Benchmark test","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengqi%2Fsactive-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipengqi%2Fsactive-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengqi%2Fsactive-web/lists"}