Skip to content

Commit b421414

Browse files
committed
Texts review. Move plugins configuration to plugins pages
1 parent dc027d5 commit b421414

File tree

15 files changed

+333
-431
lines changed

15 files changed

+333
-431
lines changed

docs/general/configuration.md

Lines changed: 59 additions & 178 deletions
Large diffs are not rendered by default.

docs/general/index.md

Lines changed: 11 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,18 @@ title: What is PHPStreamServer?
44

55
# What is PHPStreamServer?
66

7-
![PHP >=8.2](https://img.shields.io/badge/PHP->=8.2-777bb3.svg)
8-
![Version](https://img.shields.io/github/v/tag/phpstreamserver/phpstreamserver?label=Version&filter=v*.*.*&sort=semver&color=374151)
9-
![Tests Status](https://img.shields.io/github/actions/workflow/status/phpstreamserver/phpstreamserver/tests.yaml?label=Tests&branch=main)
10-
117
PHPStreamServer is a high-performance, event-loop-based application server and supervisor for PHP, written in PHP.
128
Built on top of the [AMPHP](https://amphp.org/) ecosystem and powered by the [Revolt](https://revolt.run/) event loop,
13-
PHPStreamServer brings asynchronous capabilities that empower the development of efficient and scalable PHP applications.
14-
PHPStreamServer ships with a collection of plugins, making it highly extensible.
15-
With the power of plugins, PHPStreamServer can replace traditional setups such as nginx, php-fpm, cron, and supervisor.
16-
By centralizing these functionalities into a single application server, it reduces complexity and simplifies application deployment.
17-
Being written in PHP, it only requires PHP to run—no additional dependencies are needed.
18-
Applications run in an always-loaded, in-memory model, which significantly improves performance by eliminating the overhead of repeated
9+
PHPStreamServer brings asynchronous capabilities that enable the development of efficient and scalable PHP applications.
10+
PHPStreamServer includes a collection of plugins, making it highly extensible.
11+
With these plugins, PHPStreamServer can replace traditional server stacks, such as the combination of Nginx with PHP-FPM, along with Cron and Supervisor.
12+
By centralizing these functionalities into a single application server, PHPStreamServer reduces complexity and simplifies application deployment.
13+
Written in PHP, it requires only PHP to run—no additional dependencies are needed.
14+
Applications run in an always-loaded, in-memory model, significantly improving performance by eliminating the overhead of repeated
1915
loading and initialization.
2016

21-
## Requirements and limitations:
22-
- Unix based OS (no windows support);
23-
- *php-posix* and *php-pcntl* extensions;
24-
- *php-uv* extension is recommended for high-load environments.
25-
26-
## Features
27-
28-
### Supervisor
29-
- Restart workers when memory usage exceeds a defined threshold.
30-
- Restart workers after a specified uptime.
31-
- Restart workers in case of exceptions.
32-
- Supports supervising external processes.
33-
34-
### HTTP Server
35-
- Asynchronous HTTP server with HTTP/2 and HTTPS support.
36-
- Gzip compression.
37-
- Serve static files from specified directories.
38-
- Middleware support.
39-
40-
### Scheduler
41-
- Support cron like syntax for define schedules.
42-
- Support relative syntax as supported by \DateInterval.
43-
44-
### Logger
45-
- Channel-based and severity-based log routing.
46-
- Save logs to files with rotation and compression.
47-
- Stdout or stderr logging.
48-
- Configurable formatters.
49-
- Syslog.
50-
- Graylog (GELF).
51-
52-
### File Monitor
53-
- Monitors directories and automatically restart workers whenever files change.
54-
55-
### Metrics
56-
- Exposes a prometheus metrics endpoint for monitoring and observability.
57-
- Provides default metrics for monitoring server performance.
58-
- Allows to define custom metrics for application-specific monitoring.
17+
## Requirements and Limitations:
18+
- Unix-based operating system
19+
- **PHP 8.2** or higher
20+
- **php-posix** and **php-pcntl** extensions
21+
- **php-uv** extension (recommended for high-load environments)

docs/general/installation.md

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,14 @@ title: Installation
44

55
# Installation
66

7-
## PHPStreamServer core
7+
## PHPStreamServer Core
88
The core component is required to run PHPStreamServer.
9-
It includes the core server functionality as well as the supervisor to manage worker processes.
9+
It provides the essential server functionality along with a supervisor to manage worker processes.
1010
```bash
1111
$ composer require phpstreamserver/core
1212
```
1313

14-
## PHPStreamServer plugins
15-
To extend the functionality of PHPStreamServer, you can install additional [plugins](/docs/plugins/).
16-
Each plugin is optional, so you can choose only those that are relevant to your application.
17-
18-
### Http Server Plugin
19-
An asynchronous HTTP server with HTTP/2, HTTPS, static file serving, and gzip compression.
20-
```bash
21-
$ composer require phpstreamserver/http-server
22-
```
23-
[Read more](/docs/plugins/http-server)
24-
25-
### Scheduler Plugin
26-
A cron-like scheduler for running tasks at specified intervals.
27-
```bash
28-
$ composer require phpstreamserver/scheduler
29-
```
30-
[Read more](/docs/plugins/scheduler)
31-
32-
### Logger Plugin
33-
A flexible logging system that supports multiple outputs, including files, stderr, syslog, and Graylog.
34-
```bash
35-
$ composer require phpstreamserver/logger
36-
```
37-
[Read more](/docs/plugins/logger)
38-
39-
### File Monitor Plugin
40-
Monitors directories for changes and automatically reloads workers whenever a file is modified.
41-
```bash
42-
$ composer require phpstreamserver/file-monitor
43-
```
44-
[Read more](/docs/plugins/file-monitor)
45-
46-
### Metrics Plugin
47-
Exposes prometheus metrics to monitor server performance and collect custom application metrics.
48-
```bash
49-
$ composer require phpstreamserver/metrics
50-
```
51-
[Read more](/docs/plugins/metrics)
14+
## PHPStreamServer Plugins
15+
You can extend the functionality of PHPStreamServer by installing additional plugins.
16+
Each plugin is optional, so you only need to install those relevant to your application.
17+
[Read more →](/docs/plugins/)

docs/general/quick-start.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ title: Quick Start
44

55
# Quick Start
66

7-
Follow these steps to get started with PHPStreamServer and run your first application on it!
8-
In this example, we'll run a basic HTTP server and general purpose worker.
7+
Follow these steps to get started with PHPStreamServer and run your first application.
8+
In this example, you will set up a basic HTTP server and a general-purpose worker.
99

10-
### Install composer packages
10+
### Install Composer Packages
1111

1212
```bash
1313
$ composer require phpstreamserver/core phpstreamserver/http-server
1414
```
1515

16-
### Configure a simple server
16+
### Configure a Simple Server
1717

1818
```php title="server.php"
1919
use Amp\Http\Server\HttpErrorException;
@@ -55,13 +55,13 @@ $server->addWorker(
5555
exit($server->run());
5656
```
5757

58-
### Run server
58+
### Run Server
5959

6060
```bash
6161
$ php server.php start
6262
```
6363

64-
The output will appear in the console like this:
64+
The output will appear in the console as follows:
6565
![Image](/img/phpss-start-output.png)
6666

67-
Now, open your web browser and go to http://127.0.0.1:8080/
67+
Now open your web browser and navigate to http://127.0.0.1:8080/

docs/general/reload-strategies.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)