s2ws

2.2.0 • Public • Published

s2ws

Expose spawn to WebSockets

Example

var s2ws = require('s2ws');

var server = s2ws.server(function(body, func, reject) {
    var url = body.url;

    if(!url) {
        return reject(['no url']);
    }

    func('curl', ['--', url]);
});

server.listen(3000);

Readme

Keywords

Package Sidebar

Install

npm i s2ws

Weekly Downloads

1

Version

2.2.0

License

ISC

Unpacked Size

7.44 kB

Total Files

8

Last publish

Collaborators

  • kpcyrd