{"id":21655569,"url":"https://github.com/die-welle/output-host","last_synced_at":"2026-05-02T23:34:30.674Z","repository":{"id":57316940,"uuid":"49192367","full_name":"die-welle/output-host","owner":"die-welle","description":"A simple and convenient tool to output host for website developing.","archived":false,"fork":false,"pushed_at":"2017-09-28T05:52:04.000Z","size":43,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-25T07:41:58.861Z","etag":null,"topics":["address","convenient","copy-paste","host","ip","localhost","nodejs","terminal","web-development"],"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/die-welle.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":"2016-01-07T08:39:44.000Z","updated_at":"2017-07-25T10:27:09.000Z","dependencies_parsed_at":"2022-08-25T21:11:29.287Z","dependency_job_id":null,"html_url":"https://github.com/die-welle/output-host","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/die-welle%2Foutput-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/die-welle%2Foutput-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/die-welle%2Foutput-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/die-welle%2Foutput-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/die-welle","download_url":"https://codeload.github.com/die-welle/output-host/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554132,"owners_count":20471173,"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","convenient","copy-paste","host","ip","localhost","nodejs","terminal","web-development"],"created_at":"2024-11-25T08:33:23.210Z","updated_at":"2025-10-18T22:48:34.690Z","avatar_url":"https://github.com/die-welle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"output-host\n=========================\n\nA simple and convenient tool to output host for website developing.\n\n\n## Motivation\n\nWhen testing your website on mobile or other devices from LAN, you usually need to get your external server host (eg: http://192.168.1.123:3000), and then copy and paste it to your browser address bar, and share to other devices.\n\nThis tool makes these easily.\n\n\n## Quick Start\n\n#### outputHost([options])\n\n```js\nimport outputHost from 'output-host';\nimport http from 'http';\n\nconst port = 3000;\nconst app = http.createServer();\n\napp.listen(port, () =\u003e outputHost({\n\n    // Here's all options.\n\n    port: 3000, // Defaults to `3000`\n    host: 'localhost', // Host name. Defaults to 'localhost'\n    name: 'Server', // Prefix name. Defaults to 'Server'\n    protocol: 'http', // Defaults to `http`\n    local: true, // Enable to log localhost. Defaults to `true`\n    external: true, // Enable to log external host. Defaults to `true`\n    copy: true, // Enable to copy external host. So you could easy to paste to browser address bar. Defaults to `true`\n    color: true, // Enable color. Defaults to `true`\n    logger: console.log.bind(console), // Custom logger function. Defaults to `console.log.bind(console)`\n    launch: 'none', // Enable to auto launch browser. Value could be one of 'none', 'chrome' or 'firefox'. Defaults to 'none'\n    launchDelay: 2000, // Launch browser delay. Only work if `launch=chrome|firefox`. Defaults to `2000`\n}));\n\n// output:\n//\n//    Server Local URL http://localhost:3000\n//    Server External URL http://192.168.1.123:3000\n\n// `http://192.168.1.123:3000` would be added to clipboard automatically.\n\n```\n\n#### outputHost.curry([options, callback])\n\n```js\n\napp.listen(2333, outputHost.curry());\n\n// output:\n//\n//    Server Local URL http://localhost:2333\n//    Server External URL http://192.168.1.123:2333\n\n```\n\n#### cli\n\n```bash\n $ output-host -p 2333\n\n# output:\n#\n#    Server Local URL http://localhost:2333\n#    Server External URL http://192.168.1.123:2333\n```\n\nPlease run `output-host -h` to learn more.\n\n\n## Installation\n\nUsing [npm](https://www.npmjs.com/):\n\n```bash\n $ npm install output-host --save-dev\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdie-welle%2Foutput-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdie-welle%2Foutput-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdie-welle%2Foutput-host/lists"}