Skip to content

The Firebase Cloud Functions for an electronic Post-It note system.

Notifications You must be signed in to change notification settings

kelvin589/diginote_cloud_functions

Repository files navigation

diginote_cloud_functions

The Firebase Cloud Functions for an electronic Post-It note system, Diginote and Diginote Screen.

Overview

An overview of the cloud functions:

  • notifyDevicesToLowBattery notifies devices, linked to the screen, to low battery of a screen.
  • getUsersEmail retrieves a user's email based on user ID.
  • onIsOnlineChanged listens to updates in Firebase Realtime Database and notifies devices, linked to the screen, to changes in screen presence.
  • notifyDevicesToOnlineStatus manually sets a screen's online status and notifies devices, linked to the sceen, to the updated status.

Setup

These setup instructions assume you have setup firebase prior using instructions from Diginote or Diginote Screen.

  1. Ensure your project is on the blaze plan (you will not be charged as long as you stay below limits)
  2. Clone the project to get a local copy
git clone https://github.com/kelvin589/diginote_cloud_functions
  1. Change your directory to the project folder
cd diginote_cloud_functions
  1. Run firebase use --add to create an alais for your Firebase project
  2. Ensure your Firebase poject is selected using firebase use
    • If your Firebase project is not selected, run ```firebase use
  3. Initiate the project folder for Firebase Cloud Functions using firebase init functions
    • Choose JavaScript for the language
    • Use ESLint
    • If asked, do not overwrite existing files
    • Choose the option to install dependencies with npm
  4. Run firebase deploy --only functions to deploy the Cloud Functions
  5. The Cloud Functions are ready to use

Releases

No releases published

Packages

No packages published