Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pyrite-framework/pyrite-connect-emitter


https://github.com/pyrite-framework/pyrite-connect-emitter

client helper socket-io

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# pyrite-connect

## Install

```
npm install pyrite-connect
npm install pyrite-connect-emitter
```

## Example

```typescript
import { PyriteConnect } from "pyrite-connect";
import { EmitterPlugin } from "pyrite-connect-emitter";

const connect = new PyriteConnect({
url: 'http://localhost:8080',
plugins: [new EmitterPlugin()]
});

connect.getRoutes()
.then((routes) => {
routes.Users.on.createUser((data, id) => {
console.log(data, id);

routes.Users.off.createUser();
});
});
```