{"id":18389690,"url":"https://github.com/danielwpz/crepecake-common","last_synced_at":"2025-04-12T06:30:04.876Z","repository":{"id":54789910,"uuid":"166124755","full_name":"danielwpz/crepecake-common","owner":"danielwpz","description":"Commonly-used middlewares for crepecake","archived":false,"fork":false,"pushed_at":"2022-12-07T01:06:15.000Z","size":24,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T11:47:08.423Z","etag":null,"topics":[],"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/danielwpz.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":"2019-01-16T22:58:02.000Z","updated_at":"2021-02-03T11:33:55.000Z","dependencies_parsed_at":"2023-01-23T22:18:06.691Z","dependency_job_id":null,"html_url":"https://github.com/danielwpz/crepecake-common","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielwpz%2Fcrepecake-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielwpz%2Fcrepecake-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielwpz%2Fcrepecake-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielwpz%2Fcrepecake-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielwpz","download_url":"https://codeload.github.com/danielwpz/crepecake-common/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248528890,"owners_count":21119396,"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":[],"created_at":"2024-11-06T01:44:11.236Z","updated_at":"2025-04-12T06:30:04.839Z","avatar_url":"https://github.com/danielwpz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crepecake-common\n\nCommonly-used middlewares for crepecake.\n\n## Default middlewares\n1. compress: https://github.com/koajs/compress\n2. helmet: https://github.com/venables/koa-helmet\n3. logger: https://github.com/danielwpz/logger\n4. bodyparser: https://github.com/koajs/bodyparser\n5. cors: https://github.com/koajs/cors\n\n## Examples\n\n1. Use default middlewares\n```javascript\nconst common = require('crepecake-common');\nconst app = new CrepeCake();\n\napp.use(common());\n```\n\n2. Config default middlewares\n```javascript\nconst common = require('crepecake-common');\nconst app = new CrepeCake();\n\napp.use(common({\n  helmet: {...helmet options},\n  bodyparser: {...bodyparser options}\n}));\n```\n\n3. Use custom middlewares\n```javascript\nconst common = require('crepecake-common');\nconst app = new CrepeCake();\n\napp.use(common({\n  bodyparser: false,  // set false will disable the default middleware\n  myBodyparser: (ctx, next) =\u003e {...}  // add your own\n}));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielwpz%2Fcrepecake-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielwpz%2Fcrepecake-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielwpz%2Fcrepecake-common/lists"}