{"id":23659811,"url":"https://github.com/peu77/expresswrapper","last_synced_at":"2025-12-01T16:30:16.114Z","repository":{"id":48852027,"uuid":"516872007","full_name":"Peu77/ExpressWrapper","owner":"Peu77","description":"Simple construct for an express application.","archived":false,"fork":false,"pushed_at":"2022-07-31T08:02:58.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T17:05:23.577Z","etag":null,"topics":["backend","express","npm-package","simple","typescript"],"latest_commit_sha":null,"homepage":"","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/Peu77.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":"2022-07-22T19:58:28.000Z","updated_at":"2022-07-23T21:08:57.000Z","dependencies_parsed_at":"2022-09-24T06:24:49.119Z","dependency_job_id":null,"html_url":"https://github.com/Peu77/ExpressWrapper","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/Peu77%2FExpressWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peu77%2FExpressWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peu77%2FExpressWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peu77%2FExpressWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peu77","download_url":"https://codeload.github.com/Peu77/ExpressWrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239650515,"owners_count":19674763,"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":["backend","express","npm-package","simple","typescript"],"created_at":"2024-12-29T02:57:24.919Z","updated_at":"2025-12-01T16:30:15.807Z","avatar_url":"https://github.com/Peu77.png","language":"TypeScript","readme":"# ExpressWrapper\n\n[![install size](https://packagephobia.com/badge?p=@peu77/expresswrapper)](https://packagephobia.com/result?p=@peu77/expresswrapper)\n\nSimple construct for an express application.\n\n## Installation\n\n### With NPM\n\n``npm i @peu77/expresswrapper``\n\n## With Yarn\n\n``yarn add @peu77/expresswrapper``\n\n### You need to create a service and a controller\n\n###  \n\n#### Imports\n```typescript\nimport {\n    Controller,\n    initControllers,\n    RouteType,\n    Service,\n    generateListener,\n    DependencyImpl\n} from '@peu77/expresswrapper';\n```\n\n#### Basic service\n```typescript\nconst service: Service = {\n    listeners: [\n        generateListener(RouteType.POST, \"test\", (data: any) =\u003e {\n            return {\n                success: true,\n                message: \"finished\",\n                status: 200,\n                data: {}\n            }\n        })\n    ]\n}\n```\n\n#### Basic controller which use the service\n```typescript\nconst controller: Controller = {\n    prefix: \"/api\",\n    service: service,\n    routes: [\n        {\n            path: \"test\",\n            type: RouteType.POST,\n            guards: [],\n            dependencies: []\n        }\n    ]\n}\n```\n\n#### If you have a controller you can use the initControllers function\n```typescript\nconst app = express();\napp.listen(3000, () =\u003e {\n    initControllers(app, [controller]);\n})\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeu77%2Fexpresswrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeu77%2Fexpresswrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeu77%2Fexpresswrapper/lists"}