Skip to content

Demo using pushpin using golang backend server and react js and react native frontend applications

Notifications You must be signed in to change notification settings

HaswinVidanage/go-pushpin-demo

Repository files navigation

Starting pushpin

 docker-compose up --build -d

Run the test server

go run main.go

Test Query to publish a message

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 1234" \
-d '{"message":"Test Message : '$(shuf -i 1-999 -n 1)' : '$(date +"%Y:%m:%d:%H:%M:%S")'"}' \
'http://localhost:8000/publish'

SSE

curl -H "Authorization: Bearer 1234" -H "X-Channel-Name: test-common" http://127.0.0.1:7999/sse

Long-polling

curl -H "Authorization: Bearer 1234" -H "X-Channel-Name: test-common" http://127.0.0.1:7998/longpoll

Websocket

websocat "ws://127.0.0.1:7998/websocket" -H="Authorization: Bearer 1234" -H="X-Channel-Name: test-common"

Serve HTML File

 http-server go-streaming-protocols/go-pushpin/http -p 8081 --cors

About

Demo using pushpin using golang backend server and react js and react native frontend applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published