Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit a9d5125

Browse files
authored
Merge branch 'master' into master
2 parents 8f7187a + 56675fc commit a9d5125

12 files changed

+896
-779
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 1.3.7
2+
3+
Allow variables in .env file to set options in the server configuration.
4+
5+
### Updates
6+
- Auth Host: `LARAVEL_ECHO_SERVER_AUTH_HOST` *Note*: This option will fall back to the `LARAVEL_ECHO_SERVER_HOST` option as the default if that is set in the .env file.
7+
8+
- *Host*: `LARAVEL_ECHO_SERVER_HOST`
9+
10+
- *Port*: `LARAVEL_ECHO_SERVER_PORT`
11+
12+
- *Debug*: `LARAVEL_ECHO_SERVER_DEBUG`
13+
114
# 1.3.3
215

316
Return a better error when member data is not present when joining presence channels.

README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel Echo Server
1+
# Laravel Echo Server
22

33
NodeJs server for Laravel Echo broadcasting with Socket.io.
44

@@ -75,7 +75,7 @@ Edit the default configuration of the server by adding options to your **laravel
7575
| `authEndpoint` | `/broadcasting/auth` | The route that authenticates private channels |
7676
| `authHost` | `http://localhost` | The host of the server that authenticates private and presence channels |
7777
| `database` | `redis` | Database used to store data that should persist, like presence channel members. Options are currently `redis` and `sqlite` |
78-
| `databaseConfig` | `{}` | Configurations for the different database drivers [Example](#database)|
78+
| `databaseConfig` | `{}` | Configurations for the different database drivers [Example](#database) |
7979
| `host` | `null` | The host of the socket.io server ex.`app.dev`. `null` will accept connections on any IP-address |
8080
| `port` | `6001` | The port that the socket.io server should run on |
8181
| `protocol` | `http` | either `http` or `https` |
@@ -84,7 +84,20 @@ Edit the default configuration of the server by adding options to your **laravel
8484
| `sslCertChainPath` | `''` | The path to your server's ssl certificate chain |
8585
| `sslPassphrase` | `''` | The pass phrase to use for the certificate (if applicable) |
8686
| `socketio` | `{}` | Options to pass to the socket.io instance ([available options](https://github.com/socketio/engine.io#methods-1)) |
87-
| `apiOriginAllow` | `{}` | Configuration to allow API be accessed over CORS. [Example](#cross-domain-access-to-api)|
87+
| `apiOriginAllow` | `{}` | Configuration to allow API be accessed over CORS. [Example](#cross-domain-access-to-api) |
88+
89+
### DotEnv
90+
If a .env file is found in the same directory as the laravel-echo-server.json
91+
file, the following options can be overridden:
92+
93+
- Auth Host: `LARAVEL_ECHO_SERVER_AUTH_HOST` *Note*: This option will fall back to the `LARAVEL_ECHO_SERVER_HOST` option as the default if that is set in the .env file.
94+
95+
- *Host*: `LARAVEL_ECHO_SERVER_HOST`
96+
97+
- *Port*: `LARAVEL_ECHO_SERVER_PORT`
98+
99+
- *Debug*: `LARAVEL_ECHO_SERVER_DEBUG`
100+
88101

89102
### Running with SSL
90103

@@ -94,6 +107,9 @@ Edit the default configuration of the server by adding options to your **laravel
94107

95108
*Note: This library currently only supports serving from either http or https, not both.*
96109

110+
### Setting the working directory
111+
The working directory in which `laravel-echo-server` will look for the configuration file `laravel-echo-server.json` can be passed to the `start` command through the `--dir` parameter like so: `laravel-echo-server start --dir=/var/www/html/example.com/configuration`
112+
97113
## Subscribers
98114
The Laravel Echo Server subscribes to incoming events with two methods: Redis & Http.
99115

@@ -146,6 +162,7 @@ The HTTP subscriber is compatible with the Laravel Pusher subscriber. Just confi
146162
'options' => [
147163
'host' => 'localhost',
148164
'port' => 6001,
165+
'scheme' => 'http'
149166
],
150167
],
151168
```

0 commit comments

Comments
 (0)