{"id":47818578,"url":"https://github.com/alexandervantrijffel/ts-node-project-template","last_synced_at":"2026-04-03T18:59:53.891Z","repository":{"id":36979243,"uuid":"397245175","full_name":"alexandervantrijffel/ts-node-project-template","owner":"alexandervantrijffel","description":"Starter kit for new Node.js Typescript packages","archived":false,"fork":false,"pushed_at":"2023-09-25T03:57:35.000Z","size":9757,"stargazers_count":12,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-09-25T07:39:44.737Z","etag":null,"topics":["docker","esbuild","eslint","esm","github-actions","jest","multi-stage-build","nodejs","prettier","renovate","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandervantrijffel.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,"governance":null}},"created_at":"2021-08-17T12:20:40.000Z","updated_at":"2023-09-26T09:28:16.909Z","dependencies_parsed_at":"2023-09-25T06:12:23.989Z","dependency_job_id":null,"html_url":"https://github.com/alexandervantrijffel/ts-node-project-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/alexandervantrijffel/ts-node-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandervantrijffel%2Fts-node-project-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandervantrijffel%2Fts-node-project-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandervantrijffel%2Fts-node-project-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandervantrijffel%2Fts-node-project-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandervantrijffel","download_url":"https://codeload.github.com/alexandervantrijffel/ts-node-project-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandervantrijffel%2Fts-node-project-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31371546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["docker","esbuild","eslint","esm","github-actions","jest","multi-stage-build","nodejs","prettier","renovate","template","typescript"],"created_at":"2026-04-03T18:59:52.447Z","updated_at":"2026-04-03T18:59:53.885Z","avatar_url":"https://github.com/alexandervantrijffel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Node project template\n\nThis template contains a full project configuration for Typescript and Node 18 based projects.\n\nFeatures:\n\n- ESM module\n- `build` script that builds a single, minified, tree shaked .build/index.mjs bundle file that does not depend on external packages from node_modules. It comes with a Typescript sourcemap and is built with esbuild-kit/tsx\n- `start:watch` script for development mode, this auto rebuilds and restarts the app on changes with`tsx watch`\n- extensive lint configuration for standardized, consistent code\n- Husky configuration for validating commit messages, lint validation and running tests\n- tsconfig project configuration for Node 18 projects based on [best practices for Node 18](https://github.com/tsconfig/bases/blob/main/bases/node16.json)\n- jest configuration for unit tests, vitest for test execution [vitest features](https://vitest.dev/guide/features.html)\n- multi-staged Docker build with minimal Docker image size\n- Github Actions workflow for build, test and Docker build\n- both npm and yarn are supported\n\nThe build performance in **development build mode** increases significantly when using esbuild instead of the Typescript compiler tsc:\n\n![](https://user-images.githubusercontent.com/994409/130596241-cedf9860-f4ca-4cb3-8bc6-e4a59aad20c2.png)\n\n## Getting started\n\n### With npm\n\nRun `npm install` and `npm run serve` to run the application in development mode.\n\nRun `npm run test:watch` to run unit tests in watch mode.\n\n### With yarn\n\nInstall yarn v1.22.19 or later.\n\nRun `yarn install` and `yarn serve` to run the application in development mode.\n\nRun `yarn test:watch` to run unit tests in watch mode.\n\n## Docker build\n\nBuild the Docker image with `docker build . -t ts-node-project-template` and run it with command `docker run ts-node-project-template`.\n\nThe resulting Docker image is only 30MB. This achieved by making use of a multi-stage Docker build and using m03geek/alpine-node:pico-14 as the base image for the production build. This doesn't include npm which saves 33MB and node is packed with upx. This leads to a Docker image that is around 88MB smaller compared to the official node:alpine-14 image.\n\n## Github actions\n\nA Github Actions workflow is included that builds the package and runs the tests. When that succeeds a Docker image is built. Because node_modules are cached, both the build-test and build-docker jobs finish within a minute when the package dependencies can be retrieved from the cache.\n\nModify the workflow file at `.github/workflows/main.yml` for setting up pushing the Docker image to a registry.\n\n## Danger JS\n\nWith Danger JS checks are executed on PR's to validate the quality of the PR. The following checks are implemented in dangerfile.ts:\n\n- Do all tests succeed?\n- Does the PR title follow the !(conventional commits)[https://www.conventionalcommits.org/en/v1.0.0] standard?\n- Does the PR has a decription?\n\nThis is reported on the pull request by Danger JS as comments:\n\n![jHRgpCs](https://user-images.githubusercontent.com/994409/131375208-09be3852-938d-4e08-958d-8d49e22f9e61.png)\n\nTo allow Danger JS to add comments to the PR, take the following steps:\n\n- Create a Github Personal Access Token at https://github.com/settings/tokens/new with permission `public_repo`.\n- Add a secret to the repository with name `DANGER_TOKEN` and set the Personal Access Token as the value.\n\nTo extend dangerfile.ts with additional rules, make sure you add the `danger` package to the project as dev dependency and run danger locally on a pull request with the following command:\n\n```\nDANGER_GITHUB_API_TOKEN=\u003cgithub_personal_access_token\u003e yarn danger pr https://github.com/\u003cusername\u003e/\u003crepository\u003e/pull/\u003cpull request number\u003e\n```\n\n### Renovate\n\nThis template contain a starter configuration for !(Renovate)[https://github.com/renovatebot/renovate]. Renovate automates dependency updates by creating pull requests. Install the Renovate app for Github from !(here)[https://github.com/apps/renovate].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandervantrijffel%2Fts-node-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandervantrijffel%2Fts-node-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandervantrijffel%2Fts-node-project-template/lists"}