{"id":27708599,"url":"https://github.com/imyller/node-resolvmon","last_synced_at":"2025-08-17T16:53:08.777Z","repository":{"id":31879438,"uuid":"35447865","full_name":"imyller/node-resolvmon","owner":"imyller","description":"Automatically update Node.js DNS resolver configuration if resolv.conf changes","archived":false,"fork":false,"pushed_at":"2016-07-25T09:18:06.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T04:52:35.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/imyller.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}},"created_at":"2015-05-11T20:20:50.000Z","updated_at":"2019-04-04T06:02:06.000Z","dependencies_parsed_at":"2022-09-12T03:40:25.040Z","dependency_job_id":null,"html_url":"https://github.com/imyller/node-resolvmon","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/imyller/node-resolvmon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imyller%2Fnode-resolvmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imyller%2Fnode-resolvmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imyller%2Fnode-resolvmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imyller%2Fnode-resolvmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imyller","download_url":"https://codeload.github.com/imyller/node-resolvmon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imyller%2Fnode-resolvmon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270877279,"owners_count":24661121,"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-08-17T02:00:09.016Z","response_time":129,"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":[],"created_at":"2025-04-26T10:35:45.817Z","updated_at":"2025-08-17T16:53:08.734Z","avatar_url":"https://github.com/imyller.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"node-resolvmon\n==============\n[![Build Status](https://travis-ci.org/imyller/node-resolvmon.svg)](https://travis-ci.org/imyller/node-resolvmon)\n[![npm version](https://badge.fury.io/js/resolvmon.svg)](http://badge.fury.io/js/resolvmon)\n[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=imyller\u0026url=https://github.com/imyller/node-resolvmon\u0026title=node-resolvmon\u0026language=\u0026tags=github\u0026category=software)\n\n[![NPM](https://nodei.co/npm/resolvmon.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/resolvmon/)\n[![NPM](https://nodei.co/npm-dl/resolvmon.png?months=6\u0026height=3)](https://nodei.co/npm-dl/resolvmon/)\n\nAutomatically updates Node DNS resolver configuration if `resolv.conf` changes.\n\nWatches `/etc/resolv.conf` (or similar) for changes and updates Node DNS resolver accordingly.\nDetects if `resolv.conf` is created, deleted, renamed or modified.\n\nWhy?\n----\n\nCurrent versions of Node.js or io.js do not update their DNS resolver configuration after application has been started.\nThis is due to DNS client library (`c-ares`) lacking support for reinitialization or monitoring of system setting changes.\n\nIf the system DNS resolver is unconfigured at the time of application startup or the configuration is modified afterwards, Node engine does not keep up with the changes.\n\nThis module allows monitoring of `/etc/resolv.conf` file and updates the runtime DNS resolver configuration of the Node application without restarting it.\n\nNode Compatibility\n---------------------\n\nSupports Node.js v0.12.0+ and io.js v1.0.0+\n\nNode.js version v0.10 or earlier are not supported due to the lack of `dns.setServers()` function.\n\nPlease let me know if you have problems running it on a later version of Node or\nhave platform-specific problems.\n\nInstallation\n------------\n\nInstall `resolvmon` using [npm](http://github.com/isaacs/npm):\n\n```sh\n$ npm install resolvmon\n```\n\nOr get `resolvmon` directly from:\nhttps://github.com/imyller/node-resolvmon\n\nSynopsis\n--------\n\n### Basic\n\n```javascript\n\n// import the module and start monitoring\n\nvar resolvmon = require('resolvmon').start();\n\n```\n\n### Advanced\n\n```javascript\n\n// import the module\n\nvar resolvmon = require('resolvmon');\n\n// listen for error events\n\nresolvmon.on('error', function (err) {\n\tconsole.error(err);\n});\n\n// listen for update events\n\nresolvmon.on('update', function (nameservers) {\n\tconsole.dir(nameservers);\n});\n\n// trigger manual update\n\nresolvmon.update();\n\n// start monitoring\n\nresolvmon.start();\n\n```\n\nTesting\n-------\n\n```sh\n$ npm test\n```\n\nContributing\n------------\n\nYou can find the repository at:\nhttps://github.com/imyller/node-resolvmon\n\nIssues/Feature Requests can be submitted at:\nhttps://github.com/imyller/node-resolvmon/issues\n\nI'd really like to hear your feedback, and I'd love to receive your\npull-requests!\n\nCopyright\n---------\n\nCopyright 2015-2016 Ilkka Myller. This software is licensed\nunder the MIT License, see `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimyller%2Fnode-resolvmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimyller%2Fnode-resolvmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimyller%2Fnode-resolvmon/lists"}