Expo push notificaton server
A simple node.js server to store user credentials in a MongoDB database and send notifications to them via a Heroku scheduler command (/bin).
It is the server-side implementation of Expo push notifications in node.js for which Expo themselves provide an identical tool here, without the user saving part.
It is based on the pretty extensive hackathon-starter boilerplate where some of the scaffold comes from, but most of its features have been removed for simplification purposes.
Requirements
You'll need a running MongoDB instance for this to work. Otherwise, node won't know where to store the user data.
Setup
Usage
Tests
API calls
Save a new user:
POST /user/:type
Update a user's latest item ID:
PUT /user/:type
Delete a user:
DELETE /user/:type
:typecan beeventsorjobs- Calls are
x-www-form-urlencodedand contain one parameter:token: Expo-generated push notification token
Sending push notifications to users
The command node bin/send-notifications.js is executed every full hour on Heroku using a scheduler