npm install hook.io-webserver -g
hook.io-webserver creates an http server for browsers to connect to. Once connected, these browsers can send and receive messages to the server and each other with websocket support. But...that is boring. Anyone can do that.
In addition to standard cross-browser websockets,
hookio-webserver itself extends the
Hook prototype, which means it can easily connect to other hooks ( or have other hooks connect to it ) to seamlessly broadcast and re-broadcast messages. This means that you can now connect any browser to communicate with your hook.io network.
hookio-webserver is the bare minimal for component required for opening up a socket.io based websocket server which communicates with hook.io. If you are looking to build a full-featured real-time web application with hook.io, you should use the hook.js project.
as a stand-alone binary
var Webserver = Webserver;var webserver =name: 'hook.io-webserver'port: 9000webroot: './public';webserverstart;
Starts up a webserver which takes all incoming HTTP requests and emits the request headers and body to your hook.io network2