Total Pageviews

Monday, 11 July 2016


pusher is a push server written by golang.


  • Light weight
  • High performance
  • Pure Golang
  • Embeddable
  • Supports single push and pushall
  • Supports push or pushall with a schedule time
  • Scalable architecture (Unlimited dynamic message and sender modules)
  • Asynchronous push notification based on Periodic task system


go get -v
cd $GOPATH/src/
go install ./...

Getting start with pusher command

First start the needed server

Second start pusher api server

  • Start pusher api server with the command pusher
  • The pusher api server default run on http://localhost:6000

Third start pusher worker

  • Go to register an account and get the key and user
  • Go to register an account and build an app, then get the app key and app secret
  • Start pusher worker with the command
pusher_worker -sendgrid_key=sgKey \
              -sendgrid_user=sgUser \
              -from_name=example \
              -alidayu_key=alidayuAppKey \

Fourth push the message with curl

  • Create a pusher
curl -i http://localhost:6000/pusher/pushers/ \
     -d pusher=lupino \
     -d \
     -d phoneNumber=12345678901 \
     -d nickname=xxxxx \
     -d createdAt=1456403493
  • Add sender to pusher
curl -i http://localhost:6000/pusher/sendmail/add -d pusher=lupinno
curl -i http://localhost:6000/pusher/sendsms/add -d pusher=lupinno
  • Push a message
curl -i http://localhost:6000/pusher/sendmail/push \
     -d pusher=lupino \
     -d data='{"subject": "subject", "text": "text"}'