gfire-client
v1.1.3
Published
This project can be used to listen to realtime database changes from the [gfire server](https://bitbucket.org/gwat/gfire-server/src/master/). To see a usage example please view the [social proofs server](https://bitbucket.org/gwat/social-proofs-server/src
Downloads
13
Readme
What does this do?
This project can be used to listen to realtime database changes from the gfire server. To see a usage example please view the social proofs server implementation.
What is is build with?
- Typescript
- Socket.io client
How do I get set up?
npm install gfire-client
Usage
import { GFireListener } from 'gfire-client';
const listener = new GFireListener({
url: "...",
auth: "...",
env: "live | development", // Only works with live at the moment
database: "...",
table: "...",
actions: ["insert", "update", "delete"] // Combination of these
}).valueChanges((val: any)=>{
// Process table row change val
});
// Close connection when finished listening
listener.close();
Deployment
- Make sure you are logged into the gwat npm account
- Run
npm run build
- Use np to deploy updates
Contact
- Harrison
- Vahid ([email protected])