A Node.js application to schedule updates for firebase remote config parameters. Schedule updates at specific scheduled date & time or schedule the changes for a specific period with the help of starting and ending date & times.
-
Install dependencies:
npm install
-
Add your Firebase Admin SDK service account key:
- Download the
service-account-key.json
file from Firebase Console. - Place the
service-account-key.json
file in the root directory of your project.
- Download the
-
Start the server:
npm start
-
Fetch Config Template
- URL:
/template
- Method:
GET
- URL:
-
Add Config Parameter
- URL:
/add
- Method:
POST
- Request Body:
{ "key": "KEY", // MANDATORY "defaultValue": "VALUE", // MANDATORY - JSON values also should be converted to string "description": "", // NOT MANDATORY "conditionalValues": { "conditionName": { "value": "VALUE" } }, // NOT MANDATORY - Conditions must be created from console beforehand "valueType": "STRING|NUMBER|BOOLEAN|JSON" // NOT MANDATORY - Defaults to STRING }
- URL:
-
Schedule Publish:
- URL:
/publish
- Method:
POST
- Cases:
- None of the
startDate
,endDate
orscheduledDate
is passed, the update will be published immediately. scheduledDate
is passed, the update will be scheduled at that date for publishing.startDate
&endDate
is passed the update will be scheduled at the starting date and will be scheduled to be reverted back at the ending date.
- None of the
- Request Body:
{ "startDate": "2024-07-17T10:30:00+05:30", // NOT MANDATORY - Must be in ISO format "endDate": "2024-07-18T10:30:00+05:30", // NOT MANDATORY - Must be in ISO format "scheduleDate": "2024-07-18T10:30:00+05:30", // NOT MANDATORY - Must be in ISO format "key": "KEY", // MANDATORY - Must be an exisiting key "defaultValue": "{\"KEY\":\"VALUE\"}", // MANDATORY - JSON values also should be converted to string "conditionalValues": { "conditionName": { "value": "{\"KEY\":\"CONDITIONAL VALUE\"}" } }, // NOT MANDATORY - Conditions must be created from console beforehand "valueType": "STRING|NUMBER|BOOLEAN|JSON" // NOT MANDATORY - Defaults to existing type }
- URL:
Contributions are welcome! Please fork the repository and use a feature branch. Pull requests will be reviewed actively.
For any questions or feedback, please reach out to:
- Email: avishekdas128@gmail.com
- Twitter: avishekdas128
- LinkedIn: avishekdas128
Give a ⭐️ if this project helped you!