Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 07c3ac2

Browse files
authored
Update README.md
1 parent 2430b4a commit 07c3ac2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ Now, you can run the following command to start the **swoole_http_server**.
9999
$ php artisan swoole:http start
100100
```
101101

102+
## Get Swoole\Http\Server in your project
103+
104+
```php
105+
// app('swoole.server') is a singleton instance
106+
$swoole = app('swoole.server');
107+
var_dump($swoole->stats());
108+
```
109+
102110
## Nginx Configuration
103111

104112
> The support of swoole_http_server for Http is not complete. So, you should configure the domains via nginx proxy in your production environment.

0 commit comments

Comments
 (0)