https://github.com/rongfengliang/pushpin-openresty-docker-compose
pushpin-openresty-docker-compose
https://github.com/rongfengliang/pushpin-openresty-docker-compose
docker docker-compose lua openresty pushpin
Last synced: 2 months ago
JSON representation
pushpin-openresty-docker-compose
- Host: GitHub
- URL: https://github.com/rongfengliang/pushpin-openresty-docker-compose
- Owner: rongfengliang
- Created: 2019-02-07T01:49:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-07T09:31:50.000Z (over 7 years ago)
- Last Synced: 2025-10-24T18:36:52.190Z (9 months ago)
- Topics: docker, docker-compose, lua, openresty, pushpin
- Language: Lua
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pushpin with openresty
## stream
* access
```code
curl -i http://localhost:7999/userinfo
```
* publish message
```code
curl -X POST \
http://localhost:8080/userinfo \
-H 'Content-Type: application/json' \
-H 'Postman-Token: a401a816-2f51-4183-811b-b62a5c9c66a3' \
-H 'cache-control: no-cache' \
-d '{
"channel":"userinfo",
"data":{
"username":"demoapp\n,userinfo app \\n",
"userage":333
}
}'
```
## sse
* access
```code
http://localhost:7999/sse with broswer or some tools
```
* publish message
be like sse message type
```code
curl -X POST \
http://localhost:8080/sse \
-H 'Content-Type: application/json' \
-H 'Postman-Token: eb2dda2f-705a-42d8-87dd-be3036dd632c' \
-H 'cache-control: no-cache' \
-d '{
"channel":"loginfo",
"data": "event: userlogin\ndata: demo login \n\n"
}'
```