pyrite-connect-emitter
v0.1.0
Published
Pyrite Connect Emitter
Downloads
3
Readme
pyrite-connect
Install
npm install pyrite-connect
npm install pyrite-connect-emitter
Example
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();
});
});