{"id":14989592,"url":"https://github.com/magicdawn/impress-router-table","last_synced_at":"2026-01-04T12:53:33.999Z","repository":{"id":75520394,"uuid":"75408017","full_name":"magicdawn/impress-router-table","owner":"magicdawn","description":"Sails.js like routing for koa.js","archived":false,"fork":false,"pushed_at":"2017-04-12T05:04:03.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T02:01:31.669Z","etag":null,"topics":["express-router","koa","koa-middleware","koa-router","sails"],"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/magicdawn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-12-02T15:35:08.000Z","updated_at":"2020-09-07T04:15:12.000Z","dependencies_parsed_at":"2024-01-16T12:01:17.182Z","dependency_job_id":null,"html_url":"https://github.com/magicdawn/impress-router-table","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"03a6925fba1be5982d67b1a41f3095f3d2da8a46"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fimpress-router-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fimpress-router-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fimpress-router-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fimpress-router-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicdawn","download_url":"https://codeload.github.com/magicdawn/impress-router-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244875047,"owners_count":20524591,"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":["express-router","koa","koa-middleware","koa-router","sails"],"created_at":"2024-09-24T14:18:37.180Z","updated_at":"2026-01-04T12:53:33.950Z","avatar_url":"https://github.com/magicdawn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# impress-router-table\n\u003e Sails.js like routing for koa.js\n\n[![Build Status](https://img.shields.io/travis/magicdawn/impress-router-table.svg?style=flat-square)](https://travis-ci.org/magicdawn/impress-router-table)\n[![Coverage Status](https://img.shields.io/codecov/c/github/magicdawn/impress-router-table.svg?style=flat-square)](https://codecov.io/gh/magicdawn/impress-router-table)\n[![npm version](https://img.shields.io/npm/v/impress-router-table.svg?style=flat-square)](https://www.npmjs.com/package/impress-router-table)\n[![npm downloads](https://img.shields.io/npm/dm/impress-router-table.svg?style=flat-square)](https://www.npmjs.com/package/impress-router-table)\n[![npm license](https://img.shields.io/npm/l/impress-router-table.svg?style=flat-square)](http://magicdawn.mit-license.org)\n\n## Install\n```sh\n$ npm i impress-router-table --save\n```\n\n## API\n```js\nconst routing = require('impress-router-table');\n```\n\n### `routing(rootdir, router)`\nreturns a koa middleware\n\n```js\n\nconst app = new (require('koa'))\n\napp.use(routing(__dirname + '/api'))\n\napp.listen(9000)\n```\n\n#### `router`\n\nrouter must support `get` / `post` / etc HTTP methods\ndefaults to an new impress-router instance\n\n#### Folder structure in `rootdir`\n\nfor example in previous example, `__dirname + '/api'`,\ntake a look at [test/demo/api/](test/demo/api/)\n\n```\ntest/demo/api\n├── controllers\n│   ├── PolicyTestController.js\n│   └── RouteTestController.js\n├── policies\n│   ├── auth.js\n│   └── bar.js\n├── policy.js # policy config\n└── routes.js # routes config\n\n2 directories, 6 files\n```\n\n## Changelog\n[CHANGELOG.md](CHANGELOG.md)\n\n## License\nthe MIT License http://magicdawn.mit-license.org","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Fimpress-router-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicdawn%2Fimpress-router-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Fimpress-router-table/lists"}