{"id":13778904,"url":"https://github.com/posquit0/koa-rest-api-boilerplate","last_synced_at":"2025-05-15T17:09:28.571Z","repository":{"id":37693219,"uuid":"101548791","full_name":"posquit0/koa-rest-api-boilerplate","owner":"posquit0","description":"💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI","archived":false,"fork":false,"pushed_at":"2025-04-15T21:14:05.000Z","size":1948,"stargazers_count":492,"open_issues_count":47,"forks_count":80,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-14T07:22:01.051Z","etag":null,"topics":["api","boilerplate","circle-ci","circleci","docker","koa","koa2","node","pm2","rest","restful","skeleton","swagger","template"],"latest_commit_sha":null,"homepage":"https://koa-rest-api-boilerplate.js.org","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/posquit0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"posquit0","patreon":"posquit0","ko_fi":"posquit0","custom":"https://www.paypal.me/posquit0"}},"created_at":"2017-08-27T11:48:29.000Z","updated_at":"2025-04-29T17:43:47.000Z","dependencies_parsed_at":"2024-11-08T00:33:32.867Z","dependency_job_id":"29e66313-cbb6-4fd3-bcad-ae26bfe05e01","html_url":"https://github.com/posquit0/koa-rest-api-boilerplate","commit_stats":{"total_commits":159,"total_committers":5,"mean_commits":31.8,"dds":0.0691823899371069,"last_synced_commit":"ed077b84458a8fa32c422b0b42045cb364203d0a"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posquit0%2Fkoa-rest-api-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posquit0%2Fkoa-rest-api-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posquit0%2Fkoa-rest-api-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posquit0%2Fkoa-rest-api-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posquit0","download_url":"https://codeload.github.com/posquit0/koa-rest-api-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384989,"owners_count":22062422,"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":["api","boilerplate","circle-ci","circleci","docker","koa","koa2","node","pm2","rest","restful","skeleton","swagger","template"],"created_at":"2024-08-03T18:00:58.781Z","updated_at":"2025-05-15T17:09:28.519Z","avatar_url":"https://github.com/posquit0.png","language":"JavaScript","funding_links":["https://github.com/sponsors/posquit0","https://patreon.com/posquit0","https://ko-fi.com/posquit0","https://www.paypal.me/posquit0"],"categories":["Examples \u0026 Boilerplates","仓库"],"sub_categories":["案例 \u0026 样板程序"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/posquit0/koa-rest-api-boilerplate\" title=\"Koa REST API Boilerplate\"\u003e\n    \u003cimg alt=\"Koa REST API Boilerplate\" src=\"http://crocodillon.com/images/blog/2015/asynchronous-callbacks-in-koa--twitter.png\" width=\"240px\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ch1\u003eKoa REST API Boilerplate\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov, and Circle CI\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://circleci.com/gh/posquit0/koa-rest-api-boilerplate\"\u003e\n    \u003cimg alt=\"CircleCI\" src=\"https://circleci.com/gh/posquit0/koa-rest-api-boilerplate.svg?style=shield\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/posquit0/koa-rest-api-boilerplate\"\u003e\n    \u003cimg alt=\"Coverage Status\" src=\"https://codecov.io/gh/posquit0/koa-rest-api-boilerplate/branch/master/graph/badge.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/posquit0/koa-rest-api-boilerplate\"\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/david/posquit0/koa-rest-api-boilerplate.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/mit-license.php\"\u003e\n    \u003cimg alt=\"MIT Licence\" src=\"https://badges.frapsoft.com/os/mit/mit.svg?v=103\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ellerbrock/open-source-badge/\"\u003e\n    \u003cimg alt=\"Open Source Love\" src=\"https://badges.frapsoft.com/os/v1/open-source.svg?v=103\" /\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://communityinviter.com/apps/koa-js/koajs\" rel=\"KoaJs Slack Community\"\u003e![KoaJs Slack](https://img.shields.io/badge/Koa.Js-Slack%20Channel-Slack.svg?longCache=true\u0026style=for-the-badge)\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n**Koa REST API Boilerplate** is a highly opinionated boilerplate template for building RESTful API application with Koa.\n\nThis boilerplate include the following features:\n\n- Logging to STDOUT/STDERR stream using [Pino](http://getpino.io/)\n- A super small and optimized [Docker](https://www.docker.com/) image based on [Node.js Alpine image](https://hub.docker.com/_/node/)\n- [Swagger](https://swagger.io/) API documentation based on JSDoc\n- Continuous integration and delivery using [CircleCI](https://circleci.com/)\n- Unit Test and Integration Test along with Test Coverage using [Jest](https://facebook.github.io/jest/) testing framework\n\n---\n\n\n## Getting Started\n\n```zsh\n$ git clone https://github.com/posquit0/koa-rest-api-boilerplate your-project-name\n$ cd your-project-name\n$ rm -rf .git \u0026\u0026 git init\n```\n\n```zsh\n$ yarn\n$ yarn start\n```\n\n\n## Commands\n\n### Run\n\n```zsh\n# Run normally\n$ yarn start\n# Run the application with nodemon for development\n$ yarn dev\n```\n\n### Test\n\n```zsh\n# Test\n$ yarn test                           # Run all test\n$ yarn test:unit                      # Run only unit test\n$ yarn test:integration               # Run only integration test\n# Test (Watch Mode for development)\n$ yarn test:watch                     # Run all test with watch mode\n$ yarn test:watch:unit                # Run only unit test with watch mode\n$ yarn test:watch:integration         # Run only integration test with watch mode\n# Test Coverage\n$ yarn test:coverage                  # Calculate the coverage of all test\n$ yarn test:coverage:unit             # Calculate the coverage of unit test\n$ yarn test:coverage:integration      # Calculate the coverage of integration test\n# Test consistent coding style (Lint)\n$ yarn lint                           # Lint all sourcecode\n$ yarn lint:app                       # Lint app sourcecode\n$ yarn lint:test                      # Lint test sourcecode\n```\n\n### Archive\n\n```zsh\n$ yarn pack\n```\n\n\n## Test\n\nAll test for this boilerplate uses following tools.\n\n- [Jest](https://github.com/facebook/jest)\n- [supertest](https://github.com/visionmedia/supertest) - Easy HTTP assertions for integration test\n\n\n## Contributing\n\nThis project follows the [**Contributor Covenant**](http://contributor-covenant.org/version/1/4/) Code of Conduct.\n\n#### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/posquit0/koa-rest-api-boilerplate/issues) to report any bugs or ask feature requests.\n\n\n## Self Promotion\n\nLike this project? Please give it a ★  on [GitHub](https://github.com/posquit0/awesome-engineer-onboarding)! It helps this project **a lot**.\nAnd if you're feeling especially charitable, follow [posquit0](https://posquit0.com) on [GitHub](https://github.com/posquit0).\n\n\n## See Also\n\n- [koa-logging](https://github.com/kasa-network/koa-logging) - A middleware that logs request and response with Pino.\n- [koa-request-id](https://github.com/kasa-network/koa-request-id) - A middleware that generates a unique Request ID for every incoming HTTP request.\n- [koa-http-client](https://github.com/kasa-network/koa-http-client) - A middleware that attachs HTTP client to communicate with the context during inter-service communications.\n\n\n## License\n\nProvided under the terms of the [MIT License](https://github.com/posquit0/koa-rest-api-boilerplate/blob/master/LICENSE).\n\nCopyright © 2017-2019, [Byungjin Park](http://www.posquit0.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposquit0%2Fkoa-rest-api-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposquit0%2Fkoa-rest-api-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposquit0%2Fkoa-rest-api-boilerplate/lists"}