{"id":21363279,"url":"https://github.com/lgh06/tykoa","last_synced_at":"2026-04-28T21:35:17.556Z","repository":{"id":42098692,"uuid":"224366159","full_name":"lgh06/TyKoa","owner":"lgh06","description":"A quickstart template for TypeScript + Koa 2","archived":false,"fork":false,"pushed_at":"2023-01-11T02:41:54.000Z","size":440,"stargazers_count":1,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T19:32:15.595Z","etag":null,"topics":["api-server","knex","koa2","mysql","nodejs-server","postgraphile","postgresql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/lgh06.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":"2019-11-27T07:02:34.000Z","updated_at":"2020-04-10T03:10:48.000Z","dependencies_parsed_at":"2023-02-08T23:31:19.385Z","dependency_job_id":null,"html_url":"https://github.com/lgh06/TyKoa","commit_stats":null,"previous_names":[],"tags_count":6,"template":true,"template_full_name":null,"purl":"pkg:github/lgh06/TyKoa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgh06%2FTyKoa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgh06%2FTyKoa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgh06%2FTyKoa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgh06%2FTyKoa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgh06","download_url":"https://codeload.github.com/lgh06/TyKoa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgh06%2FTyKoa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api-server","knex","koa2","mysql","nodejs-server","postgraphile","postgresql","typescript"],"created_at":"2024-11-22T06:18:51.340Z","updated_at":"2026-04-28T21:35:17.538Z","avatar_url":"https://github.com/lgh06.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  TyKoa  \r\nA quickstart template for TypeScript + Koa 2    \r\n\r\n[中文README](README_zh.md)\r\n\r\n# Feature  \r\n\u003e 1. TypeScript + Koa 2\r\n\u003e 1. Auto scan routes, configure routes using `@Controller('/path')` above class,  and `@Post('/subPath')` above each function ( other HTTP methods are also supported )  \r\n\r\n# System Requirements  \r\n\u003e 1. Node.js latest v10.x or newer  \r\n\u003e 1. PostgreSQL ( if you use MySQL, need to configure right driver for knex, and disable PostGraphile manually )  \r\n\r\n# Usage  \r\n\r\n1. first things first, input postgres configurations in `conf/local`  \r\n1. then:  \r\n```\r\nnpm install  \r\nnpm run n (dev mode)  \r\nopen http://localhost:3000/test/2  \r\n\r\n( or, open http://localhost:3000/test/1 , you should ensure you have a table named `user_tb` first )  \r\n  \r\n-----------------------------------------------------------\r\n\r\nnpm run build ( use tsc to build codes for production )\r\nnpm start (run compiled codes for production)\r\n```\r\n\r\n# TODO  \r\n\r\n\u003e 1. ~~Better routes, like scanning directories then require, using globby~~  \r\n\u003e 1. ~~duplicated route path warning.~~  \r\n\u003e 1. IoC container, using [injection](injection) or [tsyringe](https://github.com/microsoft/tsyringe) or [Inversify](https://github.com/inversify/InversifyJS)\r\n\u003e 1. ~~add service directory~~\r\n\u003e 1. ~~jsonwebtoken~~\r\n\u003e 1. Better README\r\n\u003e 1. Better logger\r\n\u003e 1. Plugins support (like eggjs?..)\r\n\u003e 1. CLI support to quickly generate structure\r\n\u003e 1. RPC\r\n\r\n\r\n## main third party dependencies:  \r\n\u003e 1. TypeScript + its decorators + reflect-metadata  \r\n\u003e 1. Koa 2\r\n\u003e 1. Knex.js , a SQL query builder\r\n\u003e 1. pg , Postgresql Nodejs driver\r\n\u003e 1. PostGraphile , make GraphQL and Postgres things easy\r\n\u003e 1. dotenv , configurations in .env files\r\n\r\n\r\n## dev dependencies:  \r\n\u003e 1. nodemon , auto restart node when code changes\r\n\u003e 1. ts-node , execute .ts files without building to .js\r\n\u003e 1. eslint , typescript-eslint ( TSLint is deprecated )\r\n\u003e 1. concurrently , run multiple commands at one time\r\n\u003e 1. open-cli , open URL in browser, through terminal.  \r\n\r\n## Other\r\n\u003e inspired by:  \r\nhttps://github.com/midwayjs/midway/  \r\n\r\n\u003e Other similar projects:  \r\nhttps://github.com/thinkkoa/koatty","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgh06%2Ftykoa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgh06%2Ftykoa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgh06%2Ftykoa/lists"}