This is a web service that provides some back-end functionality for the Ferror Rod web and mobile apps. It is implemented using the Firebase Admin SDK for Node.js.
- Node.js 6.0 or higher
- NPM 5.0 or higher
- ID token verificiation
- Firestore access
- Setting and retrieving custom claims on user accounts
-
Download a service account key file from your Firebase project, and place it at the root of this Git repository. Rename the file to
serviceAccountKey.json
.See https://console.firebase.google.com/project/regenfarm-380c2/settings/serviceaccounts/adminsdk
-
Install the dependencies.
$ npm install
- Build the server app.
$ npm run build
- List users
npm run listUsers
- Get user information
npm run user <email>
- Grant user a role
npm run grant <anonymous | basic | prime | admin> <email>
- List users