{"id":34692747,"url":"https://github.com/nishkohli96/node-express-ts-template","last_synced_at":"2026-05-06T19:34:30.188Z","repository":{"id":288594417,"uuid":"957975517","full_name":"nishkohli96/node-express-ts-template","owner":"nishkohli96","description":"Production-ready Express.js starter template with typescript","archived":false,"fork":false,"pushed_at":"2025-07-20T07:39:38.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T09:18:23.412Z","etag":null,"topics":["docker","docker-compose","express","express-js","node-js","nodejs","nodemon","nodemon-express","pm2","pnpm","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/nishkohli96.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-31T12:47:29.000Z","updated_at":"2025-07-20T07:01:17.000Z","dependencies_parsed_at":"2025-04-19T01:06:11.270Z","dependency_job_id":"e1760c5f-f664-4a12-9e5e-efdd5344e236","html_url":"https://github.com/nishkohli96/node-express-ts-template","commit_stats":null,"previous_names":["nishkohli96/node-express-ts-template"],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/nishkohli96/node-express-ts-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishkohli96%2Fnode-express-ts-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishkohli96%2Fnode-express-ts-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishkohli96%2Fnode-express-ts-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishkohli96%2Fnode-express-ts-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishkohli96","download_url":"https://codeload.github.com/nishkohli96/node-express-ts-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishkohli96%2Fnode-express-ts-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28010330,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","docker-compose","express","express-js","node-js","nodejs","nodemon","nodemon-express","pm2","pnpm","typescript"],"created_at":"2025-12-24T22:02:23.744Z","updated_at":"2025-12-24T22:02:41.311Z","avatar_url":"https://github.com/nishkohli96.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-express-ts-template\n\nExpress JS Application with Typescript with the following features:\n\n- Express **v5** app configured\n- Handled loading of environment variables\n- Preconfigured logger middleware - [winston](https://www.npmjs.com/package/winston) for logging request details and errors \n- Docker image\n- Run in production environment with `pm2`\n\n**If you're setting up a frontend repository, you can use my [nextjs-template](https://github.com/nishkohli96/nextjs-template/pull/4) as a starting point.**\n\n## Getting Started\n\n```bash\nsh setup.sh\n```\n\nThe above command executes the `setup.sh` script to set up the project by:\n\n- Ensuring [pnpm](https://pnpm.io/), [npm-check-updates](https://www.npmjs.com/package/npm-check-updates) and [pm2](https://pm2.keymetrics.io/) are installed globally.\n- Installing all project dependencies.\n- Building the app for the first time.\n\nRun the app in `development` environment:\n\n```bash\npnpm dev\n```\n\nBuild the app and run production code:\n\n```bash\npnpm prod\n```\n\n## Update Dependencies\n\n[npm-check-updates](https://www.npmjs.com/package/npm-check-updates) is an excellent tool for detecting the latest versions of dependencies and updating them in your `package.json`. It simplifies the process of keeping your project up to date with the latest package versions.\n\n### Installation\n\nThe `setup.sh` script globally installs **npm-check-updates**.\n\nTo update packages while also understanding the impact of the changes, run:\n\n```bash\npnpm check-updates\n```\nThis groups updates by type (**major**, **minor**, **patch**), making it easier to assess potential risks before upgrading.\n\nUpdate all dependencies \u0026\u0026 check build status after updating all packages:\n\n```bash\npnpm install-updates \u0026\u0026 pnpm build\n```\n\n## PM2\n\n1.  You can use either env_file to read variables from, declare env variables in this file itself or do both. PM2 will load all variables from env_file and override any of them with keys from env.\n\n2.  By default, `pm2 start` launches PM2 as a daemon process in the background. In a Docker environment, the container expects the main process to run in the foreground. If the main process exits Docker assumes the container has completed its task and shuts it down. Since PM2 detaches and runs in the background, Docker doesn't detect an active foreground process, leading to the container's immediate exit with code 0. ​\n\n3.  The `pm2-runtime` is designed specifically for Docker environments, keeping the process in the foreground and ensuring the container remains active.\n\n4.  If you enable the `watch` flag in `ecosystem.config.js`, make sure to also also add `ignore_watch: ['logs']` in the config file as this will prevent PM2 from watching the logs directory, thereby avoiding restarts triggered by log file updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishkohli96%2Fnode-express-ts-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishkohli96%2Fnode-express-ts-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishkohli96%2Fnode-express-ts-template/lists"}