{"id":16675815,"url":"https://github.com/mpyw/php-hyper-builtin-server","last_synced_at":"2025-02-28T16:13:51.120Z","repository":{"id":57020676,"uuid":"65067897","full_name":"mpyw/php-hyper-builtin-server","owner":"mpyw","description":"Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption","archived":false,"fork":false,"pushed_at":"2020-06-02T21:15:40.000Z","size":119,"stargazers_count":106,"open_issues_count":6,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-21T15:15:04.401Z","etag":null,"topics":["builtin-server","multi-process","multiprocessing","php","ssl","tls"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/mpyw.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-08-06T06:08:57.000Z","updated_at":"2025-02-16T12:45:12.000Z","dependencies_parsed_at":"2022-08-23T12:20:37.107Z","dependency_job_id":null,"html_url":"https://github.com/mpyw/php-hyper-builtin-server","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphp-hyper-builtin-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphp-hyper-builtin-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphp-hyper-builtin-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphp-hyper-builtin-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpyw","download_url":"https://codeload.github.com/mpyw/php-hyper-builtin-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241179890,"owners_count":19923129,"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":["builtin-server","multi-process","multiprocessing","php","ssl","tls"],"created_at":"2024-10-12T13:07:59.056Z","updated_at":"2025-02-28T16:13:51.096Z","avatar_url":"https://github.com/mpyw.png","language":"PHP","readme":"# PHP Hyper Built-in Server [![Build Status](https://travis-ci.com/mpyw/php-hyper-builtin-server.svg?branch=master)](https://travis-ci.com/mpyw/php-hyper-builtin-server) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mpyw/php-hyper-builtin-server/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mpyw/php-hyper-builtin-server/?branch=master)\n\nReverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption.\n\n## Installing\n\n### Global install\n\n```shell script\ncomposer global require mpyw/php-hyper-builtin-server:^3.0\n```\n\nIf not yet, you must add **`~/.composer/vendor/bin`** to `$PATH`.  \nAppend the following statement to `~/.bashrc`, `~/.zshrc` or what not.\n\n```bash\nexport PATH=\"$HOME/.composer/vendor/bin:$PATH\"\n```\n\n### Local install only for development environment\n\n```shell script\ncomposer require --dev mpyw/php-hyper-builtin-server:^3.0\n```\n\nUse **`vendor/bin/hyper-run`** as the execution path.\n\n## Usage\n\n### Quick start\n\n```shell script\nhyper-run -S localhost -s localhost -t src/app/www\n```\n\n2 servers will start with the directory `src/app/www` as the document root:\n\n- `http://localhost:8000`\n- `https://localhost:44300`\n\nServers start with first unoccupied port within range depending on a scheme.\n\n| Scheme  | Default | Range       |\n| ------- | ------- | ----------- |\n| `HTTP`  | 8000    | 8000-8099   |\n| `HTTPS` | 44300   | 44300-44399 |\n\n### Customize ports\n\n```shell script\nhyper-run -S localhost:8080 -s localhost:4000 -t src/app/www\n```\n\n2 servers will start with the directory `src/app/www` as the document root:\n\n- `http://localhost:8080`\n- `https://localhost:4000`\n\n### Command Reference\n\n```ShellSession\nmpyw@localhost:~$ hyper-run -h\n\nUsage:\n    hyper-run \u003coptions\u003e\n\nExample:\n    hyper-run -S localhost:8000 -s localhost:44300\n\n[Required]\n    -S   \"\u003cHost\u003e:\u003cPort\u003e\" of an HTTP server. Multiple arguments can be accepted.\n    -s   \"\u003cHost\u003e:\u003cPort\u003e\" of an HTTPS server. Multiple arguments can be accepted.\n\n[Optional]\n    -n   The number of PHP built-in server clusters, from 1 to 20. Default is 10.\n    -t   Path for the document root. Default is the current directory.\n    -r   Path for the router script. Default is empty.\n    -c   Path for the PEM-encoded certificate.\n         Default is \"/Users/mpyw/.composer/vendor/mpyw/php-hyper-builtin-server/certificate.pem\".\n\nRestrictions:\n    - The option -s is only supported on PHP 5.6.0 or later.\n    - Access logs will not be displayed on Windows.\n\nmpyw@localhost:~$\n```\n\n## Note for Windows users\n\nUnfortunately, `cmd.exe` has no option to run via shebang `#!/usr/bin/env php`, so you need to create the following batch file in the proper directory.\n\n### For Standalone PHP\n\n```bat\n@echo OFF\n\"C:\\php\\php.exe\" \"%HOMEPATH%\\.composer\\vendor\\mpyw\\php-hyper-builtin-server\\hyper-run\" %*\n```\n\n### For XAMPP\n\n```bat\n@echo OFF\n\"C:\\xampp\\php\\php.exe\" \"%HOMEPATH%\\.composer\\vendor\\mpyw\\php-hyper-builtin-server\\hyper-run\" %*\n```\n\n## License\n\n- `PHP Hyper Built-in Server` is open-sourced software licensed under the [MIT license](LICENSE) by [@mpyw](https://github.com/mpyw).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpyw%2Fphp-hyper-builtin-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpyw%2Fphp-hyper-builtin-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpyw%2Fphp-hyper-builtin-server/lists"}