The KIPR database service is a small frontend to Firestore. This is required because some adblockers block the Firestore API.
Returns all records in the given collection that user has access to.
Authorization: Bearer <FIREBASE_TOKEN>
Returns the record with the given ID in the given collection that user has access to.
Authorization: Bearer <FIREBASE_TOKEN>
Creates or updates the record with the given ID in the given collection.
Authorization: Bearer <FIREBASE_TOKEN>
A JSON-encoded value of the record to write. The JSON object must contain an author
key conforming the the Author
schema.
Deletes the record with the given ID in the given collection.
Authorization: Bearer <FIREBASE_TOKEN>
yarn install
yarn build
Redis server must be running. (Check with redis-cli)
FIREBASE_SERVICE_ACCOUNT_KEY_FILE=service_account_key.json GOOGLE_STORAGE_SERVICE_ACCOUNT_KEY_FILE=service_account_key.json GOOGLE_STORAGE_BUCKET_NAME=kipr-big-store GOOGLE_STORAGE_PROJECT_ID=kipr-321905 FIREBASE_DATABASE_URL=https://kipr-321905-default-rtdb.firebaseio.com yarn start
where service_account_key.json
is a service account key file for the Firestore Admin SDK and Google Storage.
HOST
(default:127.0.0.1
) - Host to bind toPORT
(default:4000
) - Port to listen onFIREBASE_SERVICE_ACCOUNT_KEY_FILE
- Firebase service account key JSON (as a file path). Only used ifFIREBASE_SERVICE_ACCOUNT_KEY_STRING
is not presentFIREBASE_SERVICE_ACCOUNT_KEY_STRING
- Firebase service account key JSON (as a string)GOOGLE_STORAGE_SERVICE_ACCOUNT_KEY_FILE
- Google Storage service account key JSON (as a file path). Only used ifGOOGLE_STORAGE_SERVICE_ACCOUNT_KEY_STRING
is not present. Can be the same value asFIREBASE_SERVICE_ACCOUNT_KEY_FILE
GOOGLE_STORAGE_SERVICE_ACCOUNT_KEY_STRING
- Google Storage service account key JSON (as a string). Can be the same value asFIREBASE_SERVICE_ACCOUNT_KEY_STRING
GOOGLE_STORAGE_BUCKET_NAME
- Name of the Google Storage bucket in which to store big dataGOOGLE_STORAGE_PROJECT_ID
- Name of the Google Storage project in which to store big dataFIREBASE_DATABASE_URL
- Firebase database URLREDIS_HOST
(default:localhost
) - Redis hostREDIS_PORT
(default:6379
) - Redis portREDIS_PASSWORD
- Redis password