{"id":18552566,"url":"https://github.com/andrejewski/better-router","last_synced_at":"2025-05-15T11:13:36.432Z","repository":{"id":20023587,"uuid":"23291464","full_name":"andrejewski/better-router","owner":"andrejewski","description":"a more better Express Router","archived":false,"fork":false,"pushed_at":"2014-08-24T20:24:07.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T00:02:37.372Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrejewski.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":"2014-08-24T20:09:48.000Z","updated_at":"2019-03-28T16:38:51.000Z","dependencies_parsed_at":"2022-08-27T03:15:59.549Z","dependency_job_id":null,"html_url":"https://github.com/andrejewski/better-router","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/andrejewski%2Fbetter-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fbetter-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fbetter-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fbetter-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrejewski","download_url":"https://codeload.github.com/andrejewski/better-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328389,"owners_count":22052633,"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-06T21:14:35.310Z","updated_at":"2025-05-15T11:13:36.415Z","avatar_url":"https://github.com/andrejewski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"better-router\n=============\n\nThe Express Router is almost prefect for modularity. Now it is better.\n\n## Usage\n\n```javascript\nvar router = require('better-router')([options]);\n```\n\n## Differences\n\n- Routers have their own render method. The router has its own `views` and `viewEngine` options so the views directory does not have to exist in any monolithic folder for views. Call `res.routerRender()` instead of `res.render()` for different options, the fucntion signature is the same.\n\n- The mountpath that is purposefully stripped by Express is restored on the router with `router.path()` and set on `res.locals.routerUrl`. \n\n- `res.locals.routerLink` is a templating helper for making hyperlinks and redirects realtive to and within a router.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejewski%2Fbetter-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrejewski%2Fbetter-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejewski%2Fbetter-router/lists"}