Files: d3027fee807fce808aec9f7948f0719338d790e2 / lib / index.js
690 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 | Lib.format = require("./format"); |
14 | |
15 | // run as a scuttlebot plugin |
16 | var plugin = Lib; |
17 | var pkg = require("../package"); |
18 | plugin.name = "dns"; |
19 | plugin.version = "1.0.0"; |
20 | plugin.manifest = {}; |
21 | plugin.init = function (sbot, config) { |
22 | var port = config.dns && config.dns.port || 53053; |
23 | var host = config.dns && config.dns.host || config.host || "127.0.0.1"; |
24 | Lib.server.listen(sbot, port, host, function () { |
25 | console.log("%s listening on %s:%s", pkg.name, host, port); |
26 | }); |
27 | }; |
28 |
Built with git-ssb-web