@go-tubes/tubes-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published


Tubes - JavaScript Client

npm version

tubes-js is a JavaScript client library to connect to a tubes server. It provides a simple API to connect to WebSocket channels and send/receive messages.

Get Started

Install the package using your preferred package manager:

pnpm add @go-tubes/tubes-js

Example

import { TubesClient } from '@go-tubes/tubes-js';

// Initialize the client
const client = new TubesClient({ url: 'ws://localhost:8080', debugging: true });

// Connect to a channel
client.subscribeChannel("test", console.log);
client.send("test", { payload: { foo: "bar" } })

Readme

Keywords

none

Package Sidebar

Install

npm i @go-tubes/tubes-js

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

95.1 kB

Total Files

13

Last publish

Collaborators

  • mono424