{"id":23629804,"url":"https://github.com/willworks/leibniz","last_synced_at":"2025-09-12T00:47:37.493Z","repository":{"id":80025999,"uuid":"89219570","full_name":"willworks/leibniz","owner":"willworks","description":"A Node.js framework build with Koa2","archived":false,"fork":false,"pushed_at":"2017-04-24T05:47:46.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T08:51:48.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/willworks.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-24T09:05:52.000Z","updated_at":"2018-03-05T15:08:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dc2b3a3-674f-446b-bf81-d6d88e3a08f4","html_url":"https://github.com/willworks/leibniz","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/willworks/leibniz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2Fleibniz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2Fleibniz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2Fleibniz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2Fleibniz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willworks","download_url":"https://codeload.github.com/willworks/leibniz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2Fleibniz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274732523,"owners_count":25339345,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-28T01:18:17.546Z","updated_at":"2025-09-12T00:47:37.473Z","avatar_url":"https://github.com/willworks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Node.js framework build with Koa2\n\n[![CircleCI](https://circleci.com/gh/ruiming/leibniz.svg?style=shield)](https://circleci.com/gh/ruiming/leibniz)\n[![codecov](https://codecov.io/gh/ruiming/leibniz/branch/master/graph/badge.svg)](https://codecov.io/gh/ruiming/leibniz)\n[![NodeVersion](https://img.shields.io/node/v/leibniz.svg)](https://img.shields.io/node/v/leibniz.svg)\n[![Dependencies](https://img.shields.io/david/ruiming/leibniz.svg?maxAge=2592000)](https://img.shields.io/david/ruiming/leibniz.svg?maxAge=2592000)\n[![DevDependencies](https://img.shields.io/david/dev/ruiming/leibniz.svg?maxAge=2592000)](https://img.shields.io/david/dev/ruiming/leibniz.svg?maxAge=2592000)\n[![Release](https://img.shields.io/github/release/ruiming/leibniz.svg?maxAge=2592000)](https://img.shields.io/github/release/ruiming/leibniz.svg?maxAge=2592000)\n[![License](https://img.shields.io/npm/l/leibniz.svg?maxAge=2592000)](https://img.shields.io/npm/l/leibniz.svg?maxAge=2592000)\n\n\nBuild for RESTful Web services\n\n## TodoList\n\n- [ ] ratelimit 中间件自动装载\n- [ ] 配置文件及读取，据此配置中间件加载等\n- [ ] context 扩展方法\n- [ ] request 扩展方法\n- [ ] util 工具类\n- [ ] 使用 use 来加载模块，模拟命名空间\n\n## Example\n\n- app.js\n  ```javascript\n  import Leibniz from 'leibniz'\n\n  const app = new Leibniz()\n\n  app.listen(8000)\n  ```\n\n- controller/post.js\n  ```javascript\n  import { Get, Controller, Validate, Joi } from 'Leibniz'\n\n  @Controller('/post')\n  export default class PostController {\n    @Get('/:id')\n    @Validate({\n      params: {\n        id: Joi.number().integer()\n      }\n    })\n    async index (ctx) {\n      const data = await ctx.service.post.show(id)\n      ctx.status = 200\n      ctx.body = {\n        success: true\n      }\n    }\n  }\n  ```\n\n- service/post.js\n  ```javascript\n  export default class PostService {\n    static async show (id) =\u003e {\n      return await Database.Post.findById(id)\n    }\n  }\n  ```\n\n\nAll done.\n\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fleibniz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillworks%2Fleibniz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fleibniz/lists"}