{"id":15651843,"url":"https://github.com/silverwind/daemonize-process","last_synced_at":"2025-07-16T12:07:24.074Z","repository":{"id":65334074,"uuid":"116433421","full_name":"silverwind/daemonize-process","owner":"silverwind","description":"Daemonize the current Node.js process","archived":false,"fork":false,"pushed_at":"2025-02-14T17:45:51.000Z","size":361,"stargazers_count":33,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T00:42:41.496Z","etag":null,"topics":["daemon","daemonize","module","nodejs","nodejs-modules"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silverwind.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}},"created_at":"2018-01-05T22:31:41.000Z","updated_at":"2025-05-25T22:52:27.000Z","dependencies_parsed_at":"2024-03-26T02:33:00.909Z","dependency_job_id":"3376a789-507d-4559-82de-fa27f5649e27","html_url":"https://github.com/silverwind/daemonize-process","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"72815a7291dc4e115f0df11107c559e552fe626f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/silverwind/daemonize-process","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fdaemonize-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fdaemonize-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fdaemonize-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fdaemonize-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverwind","download_url":"https://codeload.github.com/silverwind/daemonize-process/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fdaemonize-process/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265508344,"owners_count":23779128,"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":["daemon","daemonize","module","nodejs","nodejs-modules"],"created_at":"2024-10-03T12:40:22.387Z","updated_at":"2025-07-16T12:07:23.982Z","avatar_url":"https://github.com/silverwind.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# daemonize-process\n[![](https://img.shields.io/npm/v/daemonize-process.svg?style=flat)](https://www.npmjs.org/package/daemonize-process) [![](https://img.shields.io/npm/dm/daemonize-process.svg)](https://www.npmjs.org/package/daemonize-process) [![](https://packagephobia.com/badge?p=daemonize-process)](https://packagephobia.com/result?p=daemonize-process)\n\n\u003e Daemonize the current Node.js process\n\nThe module re-spawns the current process and then exits, which will lead to the new child process being adopted by `init` or similar mechanisms, effectively putting the current process into the background.\n\nDifferences to the `daemon` module include:\n\n- Exposes all options of `child_process.spawn`.\n- Cleans up `process.env` after itself.\n\n## Install\n\n```console\n$ npm i daemonize-process\n```\n\n## Examples\n\n```js\nimport {daemonizeProcess} from \"daemonize-process\";\n\ndaemonizeProcess();\n\n// below here the process is daemonized\n```\n\n## API\n\n### daemonizeProcess([options])\n\nThe `options` object can contain any valid [`child_process.spawn` option](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) as well as these properties:\n\n- `script` *string* - The path to the script to be executed. Default: The current script.\n- `arguments` *Array* - The command line arguments to be used. Default: The current arguments.\n- `node` *string* - The path to the Node.js binary to be used. Default: The current Node.js binary.\n- `exitCode` *number* - The exit code to be used when exiting the parent process. Default: `0`.\n\nBy default the standard streams of the child are ignored (e.g. attached to `/dev/null` or equivalent). If you need these streams, adjust the `stdio` option.\n\n## License\n\n© [silverwind](https://github.com/silverwind), distributed under BSD licence\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fdaemonize-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverwind%2Fdaemonize-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fdaemonize-process/lists"}