{"id":22057081,"url":"https://github.com/fspoettel/node-ts-template","last_synced_at":"2026-04-10T06:42:32.443Z","repository":{"id":175400291,"uuid":"560391321","full_name":"fspoettel/node-ts-template","owner":"fspoettel","description":"🧰 Template for developing Node.js projects with TypeScript.","archived":false,"fork":false,"pushed_at":"2024-04-11T18:00:19.000Z","size":552,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-13T16:12:31.087Z","etag":null,"topics":["nodejs","template","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/fspoettel.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-11-01T11:56:19.000Z","updated_at":"2024-04-15T05:53:03.906Z","dependencies_parsed_at":"2024-01-21T06:21:50.147Z","dependency_job_id":"b53e767d-3e59-45cb-be79-3cc3587482fd","html_url":"https://github.com/fspoettel/node-ts-template","commit_stats":null,"previous_names":["fspoettel/node-ts-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspoettel%2Fnode-ts-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspoettel%2Fnode-ts-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspoettel%2Fnode-ts-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspoettel%2Fnode-ts-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fspoettel","download_url":"https://codeload.github.com/fspoettel/node-ts-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245128990,"owners_count":20565377,"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":["nodejs","template","typescript"],"created_at":"2024-11-30T16:16:05.531Z","updated_at":"2025-12-30T20:36:36.477Z","avatar_url":"https://github.com/fspoettel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧰 node-ts-template\n\nTemplate for developing [Node.js](https://nodejs.org) projects with [TypeScript](https://www.typescriptlang.org).\n\nFeatures:\n\n- supports [ESM](https://nodejs.org/api/esm.html) and top-level `await`.\n- [swc](https://swc.rs/) for faster builds and `tsconfig.paths` support.\n- [tsx](https://github.com/esbuild-kit/tsx) for development.\n- [vitest](https://vitest.dev/) for testing.\n- [eslint](https://eslint.org) for linting.\n- [prettier](https://prettier.io/) + [lint-staged](https://github.com/okonet/lint-staged) hook for code formatting.\n- [github actions](https://docs.github.com/en/actions) for continuous integration.\n- pre-configured [Dockerfile](https://docker.com).\n- pre-configured [debugger](https://code.visualstudio.com/docs/editor/debugging) for VS code.\n\n## Install\n\n```sh\nnpm install\n```\n\n## Develop\n\n```sh\nnpm run dev\n```\n\n## Debug\n\n```sh\nnpm run dev:debug\n```\n\n## Check types\n\n```sh\nnpm run check\n```\n\n## Build\n\n```sh\nnpm run build\n```\n\n\u003e **Note**  \n\u003e `swc` does not check for type errors when building. If you want type checks during build, run `npm run check` in conjunction.\n\n## Run built code\n\n```\nnpm run start\n```\n\n## Test\n\n```\nnpm run test\n\n# run in watch mode.\nnpm run test:watch\n\n# generate coverage report.\nnpm run test:coverage\n```\n\n## Lint\n\n```\nnpm run lint\n```\n\n## Format\n\n```\nnpm run fmt\n```\n\n## Path aliases\n\nThis template setting up path aliases via `tsconfig.paths`. By default, a `@` alias is configured, pointing to the `src` directory.\n\nIf you add new aliases, these have to be mirrored in:\n\n- `.swcrc {jsc.paths}` for the aliases to work in build output.\n- `vitest.config.ts {test.alias}` for the aliases to work in unit tests.\n\n## Docker\n\nThe included `Dockerfile` uses a multi-stage build to reduce the size of the final container. Build dependencies are pruned. Code is executed as non-root user.\n\nTo run the container, use:\n\n```\ndocker build -t node-ts-template .\ndocker run --env-file .env -p 3000:3000 node-ts-template\n```\n\n## Caveats\n\n- Due to how ESM works, module imports from a relative path require a `.js` postfix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffspoettel%2Fnode-ts-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffspoettel%2Fnode-ts-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffspoettel%2Fnode-ts-template/lists"}