first commit

This commit is contained in:
MCHost
2024-03-29 02:02:21 -04:00
commit ad36444918
5 changed files with 128 additions and 0 deletions

7
server.js Normal file
View File

@ -0,0 +1,7 @@
const crypto = require("hypercore-crypto");
const node = require('./relay.js')();
const b32 = require("hi-base32");
const key = crypto.keyPair(crypto.data(Buffer.from(process.argv[3])));
const port = process.argv[2] || 80;
console.log(b32.encode(key.publicKey).replace('====', '').toLowerCase())
node.serve(key, "localhost", port)