{"id":21283235,"url":"https://github.com/random-guys/siber","last_synced_at":"2025-03-15T14:41:53.550Z","repository":{"id":44043068,"uuid":"193401824","full_name":"random-guys/siber","owner":"random-guys","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T00:59:51.000Z","size":1085,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T00:35:48.107Z","etag":null,"topics":["dotenv","expressjs","inversify-express","inversifyjs","joi","library"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/random-guys.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}},"created_at":"2019-06-23T22:35:30.000Z","updated_at":"2021-06-14T10:42:32.000Z","dependencies_parsed_at":"2023-02-03T03:01:08.218Z","dependency_job_id":null,"html_url":"https://github.com/random-guys/siber","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Fsiber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Fsiber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Fsiber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Fsiber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/random-guys","download_url":"https://codeload.github.com/random-guys/siber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746132,"owners_count":20341203,"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":["dotenv","expressjs","inversify-express","inversifyjs","joi","library"],"created_at":"2024-11-21T11:07:32.862Z","updated_at":"2025-03-15T14:41:53.521Z","avatar_url":"https://github.com/random-guys.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# siber\n\nControllers as classes. This lib abstracts away the internals of controllers.\n\n## How to install?\n\n`yarn add @random-guys/siber`\n\nAlso, you need `yarn add inversify-express-utils`\n\n## How does it work?\n\n`my.controller.ts`\n\n```ts\nexport class MyController extends Controller\u003cMyResponseType\u003e {\n  @httpGet('/', myMiddleWare)\n  async getData(@request() req: Request, @response() res: Response) {\n    try {\n      // ...do somethings\n      this.handleSuccess(req, res, myResponse);\n    } catch (err) {\n      this.handleError(req, res, err);\n    }\n  }\n}\n```\n\nIn your `ioc.ts`\n\n```ts\nimport { Container } from 'inversify';\nimport './my.controller.ts';\n\nconst container = new Container();\nexport default container;\n```\n\nFinally, in your `app.ts`\n\n```ts\nconst server = new InversifyExpressServer(container, null);\n.server.setConfig((app: Application) =\u003e {\n  siber.buildInto(app, logger, {\n    cors: false,\n    jsend: true,\n    tracking: true\n  })\n})\n```\n\n## TODO\n\n- [ ] Tests\n- [ ] Refactor filesystem structure\n- [ ] Removed dependency on JSend\n- Move integration code to new packages\n  - [ ] `siber-bucket`\n  - [ ] `siber-provcs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-guys%2Fsiber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandom-guys%2Fsiber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-guys%2Fsiber/lists"}