{"id":15646943,"url":"https://github.com/typicode/minihost","last_synced_at":"2025-04-30T11:16:10.437Z","repository":{"id":27513977,"uuid":"30994710","full_name":"typicode/minihost","owner":"typicode","description":"Easily start and access servers","archived":false,"fork":false,"pushed_at":"2017-06-20T23:58:40.000Z","size":74,"stargazers_count":46,"open_issues_count":4,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-20T00:10:54.408Z","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/typicode.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-02-19T00:28:51.000Z","updated_at":"2024-06-14T06:09:25.000Z","dependencies_parsed_at":"2022-09-02T05:42:13.865Z","dependency_job_id":null,"html_url":"https://github.com/typicode/minihost","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fminihost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fminihost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fminihost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fminihost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typicode","download_url":"https://codeload.github.com/typicode/minihost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232747700,"owners_count":18570504,"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":[],"created_at":"2024-10-03T12:15:53.003Z","updated_at":"2025-01-06T16:40:55.367Z","avatar_url":"https://github.com/typicode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minihost [![Build Status](https://travis-ci.org/typicode/minihost.svg?branch=master)](https://travis-ci.org/typicode/minihost) [![npm version](https://badge.fury.io/js/minihost.svg)](http://badge.fury.io/js/minihost)\n\nWhen working with many dev servers, you have to increment and remember ports (e.g. [http://localhost:3000](), [http://localhost:4000](), ...).\n\nWith minihost, you don't have to think about that.\n\nWorks on Windows, Linux and OS X.\n\n## Usage\n\nInstall:\n\n```\nnpm install -g minihost\n```\n\nPrefix your commands with `h`:\n\n```bash\n~/one$ h -- nodemon\n~/two$ h -- npm start\n```\n\nYou can then __view your running servers__ on `http://localhost:2000` and __access them locally__ on `http://\u003cname\u003e*:2000` using any host that resolves to `127.0.0.1`.\n\nFor example:\n\n```bash\n# Using dnsmasq and a local .dev domain\n# Or /etc/hosts\nhttp://one.dev:2000\nhttp://two.dev:2000\n```\n\nPublic wildcard domain names that resolves to `127.0.0.1` are also supported and can be used without any system configuration:\n\n```bash\n# See til.io\nhttp://one.til.io:2000\nhttp://two.til.io:2000\n\n# See xip.io\nhttp://one.127.0.0.1.xip.io:2000\nhttp://two.127.0.0.1.xip.io:2000\n```\n\nTo set a custom name, add `-n`:\n\n```bash\n~/one$ h -n app -- nodemon\n```\n\nTo set a custom port environment variable name (instead of default `PORT`), add it after colon in custom name:\n\n```bash\n~/one$ h -n app:APP_PORT -- nodemon\n```\n\nTo enable multiple names and ports repeat `-n` option:\n\n```bash\n~/one$ h -n app1:APP1_PORT -n app2:APP_PORT1 -- nodemon\n```\n*If custom env variable names for ports not defined, `PORT_0`, `PORT_1`, `...` will be used.*  \n\nTo change the port minihost listens to, run:\n\n```bash\necho 8000 \u003e ~/.minihost\n```\n\n## Supporting minihost\n\nFor minihost to work, your server need to listen on the PORT environment variable.\n\nFrom your code:\n\n```javascript\n// KO\napp.listen(3000);\n\n// OK\napp.listen(process.env.PORT || 3000);\n```\n\nOr from the command-line:\n\n```bash\nh -- 'cmd -p $PORT'  # Linux, OS X\nh -- \"cmd -p %PORT%\" # Windows\n```\n\n## License\n\nMIT - [Typicode](https://github.com/typicode)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fminihost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypicode%2Fminihost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fminihost/lists"}