32 lines
469 B
Markdown
32 lines
469 B
Markdown
|
# Nginx Push Stream Module
|
||
|
|
||
|
https://github.com/wandenberg/nginx-push-stream-module
|
||
|
|
||
|
|
||
|
## Budowanie obrazu
|
||
|
|
||
|
```
|
||
|
docker build -t nginx_push .
|
||
|
```
|
||
|
|
||
|
## Uruchomienie obrazu
|
||
|
|
||
|
```
|
||
|
docker run -p 8080:8080 nginx_push
|
||
|
```
|
||
|
|
||
|
## Przykłady użycia
|
||
|
|
||
|
W przeglądarce wchodzimy na adres:
|
||
|
[http://localhost:8080/sub/channel_1](http://localhost:8080/sub/channel_1)
|
||
|
|
||
|
|
||
|
W konsoli wpisujemy:
|
||
|
|
||
|
```
|
||
|
curl -s -v -X POST 'http://localhost:8080/pub?id=channel_1' -d 'Hello World!'
|
||
|
```
|
||
|
|
||
|
Tadam! ;]
|
||
|
|