Skip to content

xuan9/simple-push-server

Repository files navigation

simple-push-server

A simple web server that sends push notification to apps/web etc, using the node-pushnotification library.

So can send pushes by posting to the server like this:

curl -v http://localhost:8000/send-message -d '{"sender":"testing", "registrationIds":["b2d0e95bfce054a3d220da12280cfdbb15274a1a9e5a02e5618c72b6ee32d0e2b"], "data":{"topic":"com.whatever.test","custom":{"mydata":"12341234","anotherdata":"abcd"},"aps":{"alert":"hello"}}}' -H "Content-Type: application/json"

Install

npm install
npm run start

Configuration

Configure the push accounts in the Settings.js and .dev file.

See the node-pushnotification library page for the data/settings options.

Customize

The server is built by express.js, so it's easy to add middlewares for auth, logging etc for production.

About

a simple web server that sends push notification to apps/web etc.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors