承接 horizom/dev-server 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horizom/dev-server

最新稳定版本:3.1.0

Composer 安装命令:

composer create-project horizom/dev-server

包简介

Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption

README 文档

README

Total Downloads Latest Stable Version License

Horizom Dev Server

Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption.

Installing

Global install

composer global require horizom/dev-server

If not yet, you must add ~/.composer/vendor/bin to $PATH.
Append the following statement to ~/.bashrc, ~/.zshrc or what not.

export PATH="$HOME/.composer/vendor/bin:$PATH"

Local install only for development environment

composer require --dev horizom/dev-server

Use vendor/bin/horizom-serve as the execution path.

Usage

Quick start

horizom-serve -S localhost -s localhost -t public

2 servers will start with the directory public as the document root:

  • http://localhost:8000
  • https://localhost:44300

Servers start with first unoccupied port within range depending on a scheme.

Scheme Default Range
HTTP 8000 8000-8099
HTTPS 44300 44300-44399

Customize ports

horizom-serve -S localhost:8080 -s localhost:4000 -t public

2 servers will start with the directory public as the document root:

  • http://localhost:8080
  • https://localhost:4000

Command Reference

mpyw@localhost:~$ horizom-serve -h

Usage:
    horizom-serve <options>

Example:
    horizom-serve -S localhost:8000 -s localhost:44300

[Required]
    -S   "<Host>:<Port>" of an HTTP server. Multiple arguments can be accepted.
    -s   "<Host>:<Port>" of an HTTPS server. Multiple arguments can be accepted.

[Optional]
    -n   The number of PHP built-in server clusters, from 1 to 20. Default is 10.
    -t   Path for the document root. Default is the current directory.
    -r   Path for the router script. Default is empty.
    -c   Path for the PEM-encoded certificate.
         Default is "/Users/username/.composer/vendor/horizom/dev-server/certificate.pem".

Restrictions:
    - The option -s is only supported on PHP 5.6.0 or later.
    - Access logs will not be displayed on Windows.

username@localhost:~$

Note for Windows users

Unfortunately, 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.

For Standalone PHP

@echo OFF
"C:\php\php.exe" "%HOMEPATH%\.composer\vendor\horizom\dev-server\horizom-serve" %*

For XAMPP

@echo OFF
"C:\xampp\php\php.exe" "%HOMEPATH%\.composer\vendor\horizom\dev-server\horizom-serve" %*

License

MIT license

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固