Skip to content

Commit a882725

Browse files
committed
Add installation block to plugins pages
1 parent cf92089 commit a882725

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

docs/plugins/file-monitor.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ title: File Monitor
77
The File Monitor Plugin is designed to monitor specified directories for file changes.
88
It automatically reloads workers whenever a file within those directories is modified.
99

10+
## Installation
11+
12+
```bash
13+
$ composer require phpstreamserver/file-monitor
14+
```
15+
16+
## Example of usage
17+
1018
```php title="server.php"
1119
use PHPStreamServer\Core\Plugin\Supervisor\WorkerProcess;
1220
use PHPStreamServer\Core\Server;
@@ -33,6 +41,8 @@ $server->addWorker(
3341
exit($server->run());
3442
```
3543

44+
## Configuration
45+
3646
### 🔌 FileMonitorPlugin
3747

3848
| Option | Type | Default | Description |

docs/plugins/http-server.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ title: Http Server
66

77
The HTTP Server Plugin provides an asynchronous HTTP server and includes additional reload strategies.
88

9+
## Installation
10+
11+
```bash
12+
$ composer require phpstreamserver/http-server
13+
```
14+
15+
## Example of usage
16+
917
```php title="server.php"
1018
use Amp\Http\Server\HttpErrorException;
1119
use Amp\Http\Server\Request;
@@ -45,6 +53,8 @@ $server->addWorker(
4553
exit($server->run());
4654
```
4755

56+
## Configuration
57+
4858
### 🔌 HttpServerPlugin
4959

5060
| Option | Type | Default | Description |

docs/plugins/logger.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ title: Logger
77
The Logger Plugin provides configurable logging capabilities for your application.
88
It allows you to route logs to multiple destinations, including files, stdout, syslog, and external services like Graylog.
99

10+
## Installation
11+
12+
```bash
13+
$ composer require phpstreamserver/logger
14+
```
15+
16+
## Example of usage
17+
1018
```php title="server.php"
1119
use PHPStreamServer\Core\Plugin\Supervisor\WorkerProcess;
1220
use PHPStreamServer\Core\Server;
@@ -33,6 +41,8 @@ $server->addWorker(
3341
exit($server->run());
3442
```
3543

44+
## Configuration
45+
3646
### 🔌 LoggerPlugin
3747

3848
| Option | Type | Default | Description |

docs/plugins/metrics.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ It offers several built-in metrics for tracking server performance and activity,
99
designed for their application needs.
1010
The plugin supports Counter, Gauge, Histogram, and Summary metric types.
1111

12+
## Installation
13+
14+
```bash
15+
$ composer require phpstreamserver/metrics
16+
```
17+
18+
## Example of usage
19+
1220
```php title="server.php"
1321
use PHPStreamServer\Core\Plugin\Supervisor\WorkerProcess;
1422
use PHPStreamServer\Core\Server;
@@ -46,6 +54,8 @@ $server->addWorker(
4654
exit($server->run());
4755
```
4856

57+
## Configuration
58+
4959
### 🔌 MetricsPlugin
5060

5161
| Option | Type | Default | Description |

docs/plugins/scheduler.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ title: Scheduler
66

77
The Scheduler Plugin enables you to schedule tasks at specified intervals, similar to the functionality of the traditional cron service.
88

9+
## Installation
10+
11+
```bash
12+
$ composer require phpstreamserver/scheduler
13+
```
14+
15+
## Example of usage
16+
917
```php title="server.php"
1018
use PHPStreamServer\Core\Server;
1119
use PHPStreamServer\Plugin\Scheduler\PeriodicProcess;
@@ -30,6 +38,8 @@ $server->addWorker(
3038
exit($server->run());
3139
```
3240

41+
## Configuration
42+
3343
### 🔌 SchedulerPlugin
3444

3545
This plugin does not have any specific configurable options.

0 commit comments

Comments
 (0)