phasync/swerve 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

phasync/swerve

Composer 安装命令:

composer require phasync/swerve

包简介

S(w)erve your long-running PHP applications from the CLI fast and efficiently.

README 文档

README

SWERVE

EARLY DEMO RELEASE, BUGS TO BE EXPECTED

Getting started

  1. Create a file named swerve.php in your application root. This file must return a PSR-15 RequestHandlerInterface. For example:
<?php

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\Factory\AppFactory;

$app = AppFactory::create();
$app->get('/', function (RequestInterface $request, ResponseInterface $response) {
    $response->getBody()->write('Hello, World');

    return $response;
});

return $app;
  1. Install swerve: composer require phasync/swerve

  2. Run ./vendor/bin/swerve to launch the web server.

Usage

> ./vendor/bin/swerve --help
[ SWERVE ] Swerving your website...

 >>> WARNING! THIS IS BETA SOFTWARE FOR PREVIEW ONLY <<<

Usage: swerve [-mdhvq] [-w,--workers=<processes>] [--fastcgi=<ip:port>] [--http=<ip:port>] [--https=<ip:port>] [--log=<path>] [swerve.php]

-m,--monitor              Monitor source code and reload automatically
-d                        Run as daemon
-w,--workers=<processes>  Number of worker processes (default: auto)
--fastcgi=<ip:port>       IP and port for FastCGI server
--http=<ip:port>          IP and port for HTTP server (default: 127.0.0.1:8080)
--https=<ip:port>         IP and port for HTTPS server
--log=<path>              Log errors to file
-h,--help                 Display this help message
-v,--verbose              Increase logging verbosity, repeat for higher verbosity
-q,--quiet                Suppress all output
[swerve.php]              Full path to application php file

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2024-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固