https://github.com/jahed/firebase-rest
Firebase JS SDK API using Firebase REST API under the hood instead of WebSockets.
https://github.com/jahed/firebase-rest
firebase rest
Last synced: 2 months ago
JSON representation
Firebase JS SDK API using Firebase REST API under the hood instead of WebSockets.
- Host: GitHub
- URL: https://github.com/jahed/firebase-rest
- Owner: jahed
- License: agpl-3.0
- Created: 2025-06-01T17:49:15.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-01T22:34:11.000Z (about 1 year ago)
- Last Synced: 2025-06-02T05:08:56.440Z (about 1 year ago)
- Topics: firebase, rest
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @jahed/firebase-rest
[](https://www.npmjs.com/package/@jahed/firebase-rest)
[](https://jahed.dev/)
Firebase JS SDK API using Firebase REST API under the hood instead of WebSockets.
- Supports most of [Firebase Real-time Database's Compat JS SDK API](https://firebase.google.com/docs/reference/js/v8/firebase.database).
- Use HTTP requests instead of WebSockets without changing any code.
- All queries are one-off, not real-time.
## Installation
```sh
npm install @jahed/firebase-rest
```
## Usage
```js
import firebase from "firebase/compat/app";
import { createFirebaseREST } from "@jahed/firebase-rest";
// Provide the Firebase app to createFirebaseREST.
const firebaseREST = createFirebaseREST(
firebaseApp.initializeApp({
apiKey: "",
authDomain: "",
databaseURL: ""
})
);
// Use firebaseREST to access REST APIs instead of WebSockets.
const snapshot = await firebaseREST.database().ref("/data").get();
console.log(snapshot.val());
```
## License
Copyright (C) 2025 Jahed Ahmed
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .