Files: b3dbb252f189d256c891324515d83ad97f2ffee6 / lib / index.js
655 bytesRaw
1 | var Lib = module.exports = {}; |
2 | |
3 | Lib.publish = require("./publish"); |
4 | |
5 | Lib.server = require("./server"); |
6 | |
7 | Lib.dump = require("./dump"); |
8 | |
9 | Lib.query = require("./query"); |
10 | |
11 | Lib.parse = require("./parse"); |
12 | |
13 | // run as a scuttlebot plugin |
14 | var plugin = Lib; |
15 | var pkg = require("../package"); |
16 | plugin.name = "dns"; |
17 | plugin.version = "1.0.0"; |
18 | plugin.manifest = {}; |
19 | plugin.init = function (sbot, config) { |
20 | var port = config.dns && config.dns.port || 53053; |
21 | var host = config.dns && config.dns.host || config.host || "127.0.0.1"; |
22 | Lib.server.listen(sbot, port, host, function () { |
23 | console.log("%s listening on %s:%s", pkg.name, host, port); |
24 | }); |
25 | }; |
26 |
Built with git-ssb-web