Skip to content

Translate HTTP requests to socket messages. Cool for internet of things and connecting Pebble watches to robots.

License

Notifications You must be signed in to change notification settings

garrows/sockethooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SocketHooks

http://sockethooks.garrows.com

Translate HTTP requests to socket messages.

Handy for connecting internet of things and avoiding port forwarding.

Setup

npm install socket.io-client

var deviceName = 'YOUR_NAME_HERE';

var io = require('socket.io-client');
var socket = io('http://sockethooks.garrows.com?name=' + deviceName);

socket.on('connected', function(data) {
  console.log('SocketHook ready. Go to', data.url);
});

socket.on('data', function(data) {
  console.log('Your sockethook was hit:', data);
});```


Running the above code will print out a url which you can open in your browser to fire your SocketHook.

About

Translate HTTP requests to socket messages. Cool for internet of things and connecting Pebble watches to robots.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published