https://github.com/statiohq/funk.js
🔌 NodeJS Library for interacting with Funk - Statio's Realtime Service
https://github.com/statiohq/funk.js
api funk library nodejs realtime statio typescript websocket wrapper
Last synced: about 2 months ago
JSON representation
🔌 NodeJS Library for interacting with Funk - Statio's Realtime Service
- Host: GitHub
- URL: https://github.com/statiohq/funk.js
- Owner: statiohq
- License: mit
- Created: 2021-10-18T13:10:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-30T18:00:18.000Z (over 4 years ago)
- Last Synced: 2025-04-09T21:39:28.684Z (about 1 year ago)
- Topics: api, funk, library, nodejs, realtime, statio, typescript, websocket, wrapper
- Language: TypeScript
- Homepage:
- Size: 104 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# funk.js
> 🔌 NodeJS Library for interacting with Funk - Statio's Realtime Service
## About this library
This Library is used for interacting with Funk - the realtime backend that powers Statio. Please note that this backend is not currently not intended to be used within products outside of Statio and no support is offered for outside use.
## Usage
### Creating a client
```js
import { Funk } from "funk.js";
const funk = new Funk();
```
### Subscribing to events
```js
funk.on("fullData", (data) => {
console.log("Full data received for " + data.length + " stations");
});
funk.on("stationChanged", (station) => {
console.log("Station change received for #" + station.id + " (" + station.listening + " listeners)");
});
```