Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/pyrite-framework/pyrite-connect-emitter
- Owner: pyrite-framework
- Created: 2017-10-16T01:35:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T00:33:46.000Z (about 7 years ago)
- Last Synced: 2024-10-12T17:21:09.067Z (about 1 month ago)
- Topics: client, helper, socket-io
- Language: TypeScript
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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();
});
});
```