{"id":19608899,"url":"https://github.com/forwardemail/get-fqdn","last_synced_at":"2025-04-27T20:33:10.459Z","repository":{"id":42373023,"uuid":"185683680","full_name":"forwardemail/get-fqdn","owner":"forwardemail","description":"Lookup the fully qualified domain name (\"FQDN\") of the current server's IP (default) or a custom IP.  90x faster than `hostname -f` and works with Node v6.4+.","archived":false,"fork":false,"pushed_at":"2023-01-13T08:42:38.000Z","size":143,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T16:12:28.498Z","etag":null,"topics":["address","dns","domain","fetch","fqdn","fully","hostname","ip","javascript","lookup","name","node","qualified"],"latest_commit_sha":null,"homepage":null,"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/forwardemail.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},"funding":{"github":"niftylettuce","patreon":"niftylettuce"}},"created_at":"2019-05-08T21:46:57.000Z","updated_at":"2024-02-20T12:55:23.000Z","dependencies_parsed_at":"2023-02-09T15:16:38.074Z","dependency_job_id":null,"html_url":"https://github.com/forwardemail/get-fqdn","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fget-fqdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fget-fqdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fget-fqdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fget-fqdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forwardemail","download_url":"https://codeload.github.com/forwardemail/get-fqdn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204769,"owners_count":21552286,"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":["address","dns","domain","fetch","fqdn","fully","hostname","ip","javascript","lookup","name","node","qualified"],"created_at":"2024-11-11T10:18:30.611Z","updated_at":"2025-04-27T20:33:10.027Z","avatar_url":"https://github.com/forwardemail.png","language":"JavaScript","funding_links":["https://github.com/sponsors/niftylettuce","https://patreon.com/niftylettuce"],"categories":[],"sub_categories":[],"readme":"# get-fqdn\n\n[![build status](https://github.com/forwardemail/get-fqdn/actions/workflows/ci.yml/badge.svg)](https://github.com/forwardemail/get-fqdn/actions/workflows/ci.yml)\n[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)\n[![license](https://img.shields.io/github/license/forwardemail/get-fqdn.svg)](LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/get-fqdn.svg)](https://npm.im/get-fqdn)\n\n\u003e Lookup the fully qualified domain name (\"FQDN\") of the current server's IP (default) or a custom IP.  90x faster than `hostname -f` and works with Node v14+.\n\n\n## Table of Contents\n\n* [Install](#install)\n* [Usage](#usage)\n* [Performance](#performance)\n* [Contributors](#contributors)\n* [License](#license)\n\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install get-fqdn\n```\n\n\n## Usage\n\n```js\nconst getFQDN = require('get-fqdn');\n\n// async/await usage\n(async () =\u003e {\n  try {\n    const fqdn = await getFQDN();\n    console.log('fqdn', fqdn);\n  } catch (err) {\n    console.error(err);\n  }\n});\n\n// then/catch usage\ngetFQDN().then(fqdn =\u003e console.log('fqdn', fqdn)).catch(console.error);\n```\n\nNote that you can also pass a custom IP:\n\n```js\nconst fqdn = await getFQDN('1.1.1.1');\nconsole.log('fqdn', fqdn);\n```\n\n\n## Performance\n\nThis package runs approximately 90x faster than the alternative of using `hostname -f`.\n\nIt was built to ensure that [ForwardEmail.net](https://forwardemail.net) is as optimized as possible.\n\nOthers packages [were written in CoffeeScript](https://github.com/CliffS/fqdn-promise/blob/master/src/fqdn.coffee), used [deasync](https://github.com/rsrdesarrollo/node-fqdn/blob/master/index.js), or used the [hostname -f](https://github.com/fatelei/js-fqdn/blob/ffec496afb07559fb64dc5e6b78b50c6339d78c5/lib/fqdn.js) approach (also see the [fqdn][] package that uses the wrong approach too).\n\n\n## Contributors\n\n| Name           | Website                    |\n| -------------- | -------------------------- |\n| **Nick Baugh** | \u003chttp://niftylettuce.com/\u003e |\n\n\n## License\n\n[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)\n\n\n##\n\n[npm]: https://www.npmjs.com/\n\n[fqdn]: https://www.npmjs.com/package/fqdn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fget-fqdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforwardemail%2Fget-fqdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fget-fqdn/lists"}