1.5.0 • Published 2 years ago

bagman v1.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Bagman JS

This is the official JS/TS client for Bagman

Getting Started

npm install bagman
import { Bagman } from "bagman";

// initialise client
const bagman = new Bagman({ 
    url: "<bagman-server-url>",
    apiKey: "<api-key>"
});

// subscribe to a channel
const channel = await bagman.subscribe("<channel>");
// listen to a event in a channel
// await to make sure listen is sucessful
await channel.listen("explosion", (data) => {
    // do something with the data
});

// emit some data to the channel
// await to make sure emit is successful
await channel.emit("greetings", {
    "hello": "world"
});
1.5.0

2 years ago

1.2.0

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago