{"id":26747164,"url":"https://github.com/hanchiang/node-typescript-koa","last_synced_at":"2026-05-11T03:21:18.151Z","repository":{"id":42094255,"uuid":"248216859","full_name":"hanchiang/node-typescript-koa","owner":"hanchiang","description":"Node.js typescript koa project template","archived":false,"fork":false,"pushed_at":"2023-01-24T01:39:20.000Z","size":1201,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-06T01:08:48.291Z","etag":null,"topics":["koa","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanchiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-18T11:47:11.000Z","updated_at":"2020-03-18T12:19:35.000Z","dependencies_parsed_at":"2023-02-13T09:31:03.326Z","dependency_job_id":null,"html_url":"https://github.com/hanchiang/node-typescript-koa","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fnode-typescript-koa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fnode-typescript-koa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fnode-typescript-koa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fnode-typescript-koa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanchiang","download_url":"https://codeload.github.com/hanchiang/node-typescript-koa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999607,"owners_count":20707572,"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":["koa","nodejs","typescript"],"created_at":"2025-03-28T09:17:11.592Z","updated_at":"2026-05-11T03:21:13.094Z","avatar_url":"https://github.com/hanchiang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My service\n\nThis project is created using [koa](https://koajs.com/)\n\n# Project structure\n\n- `chart/`: Helm chart resources for deployment to AWS EKS\n- `src/`\n  - `controllers/`: Main route logic are found here\n  - `config/`: Contains pre-defined environment variables\n  - `constants/`: Contains constants used in the entire service\n  - `db/`: DB configuration and connection\n    - `migrations/`: Contains a list of migrations used in the project\n    - `schema.sql`: SQL script to create tables in the database\n  - `routes/`: APIs routes\n  - `services/`: Finer grained logic that serves route controllers (and others)\n  - `types/`: Typescript typings for various codes\n  - `/utils/`: Various utility functions\n- `test/`: Integration tests and unit tests\n\n# Set up environment variables\n\n- Set up environment file `.env.dev` and `.env.test` at project root, by referring to `.env.sample` and `.env.test.sample` respectively\n\n# Running the project\n\n**Run in development mode**\n\n- Start: `docker-compose up -d my-service`\n- Server is avaiilable at `localhost:3000`\n- Stop: `docker-compose down`\n\n**Run tests**\n\n- Unit tests: `npm run test-unit`\n- Integration tests: `npm run test-integration`\n- All tests: `npm run test`\n\n# Sequelize migrations\n\nSequelize migrations are managed using the [this guide](https://medium.com/@samratshaw/sequelize-cli-migrations-with-typescript-bd1bd41cbd6)\n\n**Migration config**  \nThe migration config file contains the DB connection for each environment\n\n- Place ssl file in in `src/db/config/`\n- Create a `config.js` in `src/db/config/`, by following `src/db/config/config.sample.js` and modifying the values accordingly\n\n**Writing migration**\n\n- Generate migration file: `./migration-generate.sh \u003cname-of-migration\u003e`, which will create the migration file in `db/src/migrations`\n- Write the migration in that file\n\n**Run migration**\n\n- Migrate: `./migrate.sh \u003cenvironment\u003e`, e.g. `./migrate.sh development`\n- Undo migrate: _Stay tuned_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanchiang%2Fnode-typescript-koa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanchiang%2Fnode-typescript-koa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanchiang%2Fnode-typescript-koa/lists"}