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.
You'll need a running MongoDB instance for this to work. Otherwise, node won't know where to store the user data.
npm install
npm start
npm test
POST /user/:type
PUT /user/:type
DELETE /user/:type
:type
can beevents
orjobs
- Calls are
x-www-form-urlencoded
and contain one parameter:token
: Expo-generated push notification token
The command node bin/send-notifications.js
is executed every full hour on Heroku using a scheduler