Based on realtime database quickstart and delete unused accounts cron
- Create your project on the Firebase Console.
- Enable the anonymous sign-in provider in the Authentication > SIGN-IN METHOD tab.
- You must have the Firebase CLI installed. If you don't have it install it with
npm install -g firebase-tools
and then configure it withfirebase login
. - On the command line run
firebase use --add
and select the Firebase project you have created. - On the command line run
firebase serve
using the Firebase CLI tool to launch a local server and go tolocalhost:5000
- Deploy via
firebase deploy
- Reset DB at https://us-central1-PROJECT-NAME.cloudfunctions.net/reset?key=CRON-KEY
- Set up a cron-job to automatically hit the above url every 24 hours. I'm using https://cron-job.org/en/
- ???
- Profit
- How to make simple queries to a realtime firebase DB and make live updates
- How to use firebase anonymous authentication so that the DB isn't open to the public
- How to deploy a firebase app
- How to set a custom subdomain for a firebase app
- How to use cloud functions to make DB queries
- How to secure a cloud function with a key
- How to set up a cron job