{"id":18483681,"url":"https://github.com/ashetm/npm-express-routes-group","last_synced_at":"2025-05-13T20:35:08.598Z","repository":{"id":120687367,"uuid":"224841545","full_name":"AsheTM/npm-express-routes-group","owner":"AsheTM","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-11T15:19:49.000Z","size":578,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-27T02:27:29.526Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsheTM.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-29T11:30:58.000Z","updated_at":"2020-09-04T18:04:00.000Z","dependencies_parsed_at":"2023-06-02T14:45:14.436Z","dependency_job_id":null,"html_url":"https://github.com/AsheTM/npm-express-routes-group","commit_stats":null,"previous_names":["ashetm/express-routes-group"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheTM%2Fnpm-express-routes-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheTM%2Fnpm-express-routes-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheTM%2Fnpm-express-routes-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheTM%2Fnpm-express-routes-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsheTM","download_url":"https://codeload.github.com/AsheTM/npm-express-routes-group/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239201294,"owners_count":19599072,"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-06T12:36:54.994Z","updated_at":"2025-02-16T21:31:36.654Z","avatar_url":"https://github.com/AsheTM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express routes group\nSimple way to group your routes in Express + chaining it.\n\n\nIf you want to prefix all routes with a certain URL you can use the group method as following:\n\n```js\nvar app = require('express');\nrequire('express-routes-group');\n \napp\n  .group(\"/api/v1\", (router) =\u003e {\n      router.get(\"/path1\", controller1); // /api/v1/login \n  })\n  .group(\"/api/v2\", (router) =\u003e {\n      router.get(\"/path2\", controller2); // /api/v2/path2 \n  });\n```\n\nIn case you don't want to add a prefix but still need to group certain routes you can leave the first parameter \nand go straight for the function:\n\n```js\nvar app = require('express');\nrequire('express-routes-group');\n \napp\n  .group((router) =\u003e {\n      router.use(middleware1);\n  })\n  .group((router) =\u003e {\n      router.use(middleware2);\n  });\n```\n\n\n* Inspired from `express-group-routes`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashetm%2Fnpm-express-routes-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashetm%2Fnpm-express-routes-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashetm%2Fnpm-express-routes-group/lists"}