Download the PHP package alex-lee/fastswoole without Composer

On this page you can find all versions of the php package alex-lee/fastswoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fastswoole

fastswoole

基于 Swoole 的常驻内存 MVC 框架,功能正在逐步完善中。

主要特性

环境要求

依赖 版本 说明
PHP >= 7.2 需启用 PDO、Redis 扩展(按需)
Swoole >= 4.4 使用 Swoole\Database\PDOPool 等特性
Composer - 依赖管理

安装

composer create-project alex-lee/fastswoole fastswoole

进入项目目录,复制环境变量模板并根据实际情况修改:

cp .example.env .env

如果需要更新框架使用

composer update alex-lee/swooleframe

快速开始

启动 HTTP 服务:

php bin/http_server.php

访问 http://127.0.0.1:9501(端口见 .env 中 [SWOOLE] 节的 HTTP_PORT)。

内置示例路由:

路径 说明
/ 输出 HTML 欢迎页
/index/hello 输出 JSON
/index/coroutine 协程睡眠 1 秒后响应(验证一键协程化)
/index/systemError 抛出系统异常(验证异常处理)

目录结构

fastswoole/
├── app/                        # 应用代码
│   ├── exception/              # 异常定义(错误码集中管理)
│   └── index/                  # index 模块
│       ├── controller/         # 控制器
│       └── model/              # 模型(ORM)
├── bin/
│   └── http_server.php         # 服务启动入口
├── public/                     # 静态文件根目录
├── runtime/                    # 运行时日志(不提交,安装后自动创建)
├── .example.env                # 环境变量模板
├── composer.json
└── LICENSE

配置说明

所有配置通过项目根目录 .env 文件管理(参考 .example.env):

配置节 用途
[SWOOLE] 监听地址与端口
[APP] 调试模式、默认模块/控制器/方法
[DATABASE] MySQL 连接与连接池(USE 是否启用,POOL 每进程连接数,0 为不开启)
[REDIS] Redis 连接与连接池
[SIGN] 接口加签校验(盐值、加密方法、时间戳超时、签名字段)
[LIMIT] 接口限流(单位时间与容量)

控制器示例

文档

暂无

参与开发

请参阅 核心框架包。

版权信息

遵循 Apache2 开源协议发布,并提供免费使用。


All versions of fastswoole with dependencies

PHP Build Version
Package Version
Requires alex-lee/php-helper Version ^1.2
alex-lee/swooleframe Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alex-lee/fastswoole contains the following files

Loading the files please wait ...