websockify-js icon indicating copy to clipboard operation
websockify-js copied to clipboard

Expose javascript API

Open kevinhikaruevans opened this issue 7 years ago • 0 comments

It'd be nice if there was an API exported from the javascript version.

I'd like to just do something like this to start the server in my own application:

var websockify = require('websockify');

websockify.start({
   destinationPort: 4567,
   sourcePort: 1234
});

In es5 notation, you can just do something like:

module.exports = someObjectToExpose

kevinhikaruevans avatar Oct 13 '16 20:10 kevinhikaruevans