test-holesail-server
v1.1.3
Published
Server module for holesail to create and announce local server on the DHT
Downloads
8
Maintainers
Readme
holesail-server
Join our Discord Support Server
Create and announce your server on the HyperDHT P2P protocol.
Installation
npm i holesail-server --save-dev
Usage
Require a module
const DHT = require('holesail-server')
Create instance of the holesailServer class
const server = new DHT();
Start DHT and get the public key
server.serve(5000, '127.0.0.1', () => {
console.log('Server 1 started');
});
console.log('Server public key:', server.getPublicKey());
Destroy the DHT server
server.destroy();