Skip to content

Repository files navigation

hapio

Dependency StatusdevDependency StatusBuild StatusCoverage StatusGreenkeeper badge

A simple bridge plugin between HapiJS and SocketIO.

Plugin registration

constserver=newHapi.Server({port: 3000,host: 'localhost',});asyncfunctionstart(){try{awaitserver.register(hapio,{serverOptions: {// socket.io options}});awaitserver.start();}catch(e){console.error(e);}}start();

Using hapio

constio=server.plugins.hapio.io;io.on('connection',function(socket){console.log(`${socket.id} connected !`);socket.on('test',function(e){console.log('Test received !');});});

hapio options

A great idea?

Do not hesitate to make a pull request

An issue with hapio?

Just open an issue on Github and I will fix it as soon as possible

About

A simple bridge plugin between HapiJS and SocketIO

Topics

Resources

Stars

21 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages