Git Product home page Git Product logo

expo-push-notifications-server's Introduction

Expo push notificaton server

A simple node.js server to store user credentials in a MongoDB database and send notifications to them via a basic web interface.

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

This should be as easy as:

npm install

You may want to install nodemon for not having to constantly restart your server.

Usage

node app.js or nodemon app.js

Saving a new user

Send a POST request to /user with the following parameters:

  • name: name of the user
  • token: the exponent token that'll be used to send a push notification to a user
  • email: email of the user (used as the unique identification key when triggering a push notification)

Sending a push notification

Either go to the dashboard at / and click on "Send notification" or...

Send a POST request to /api/notification/:email, where :email is the email of the user you want to notify, with the following parameters:

  • title
  • message

expo-push-notifications-server's People

Contributors

dependabot[bot] avatar marcelkalveram avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.