Files: ca718f616a051e93adeb22faa3fc06646f667973 / server.js
649 bytesRaw
1 | |
2 | ':' //; exec "$(command -v node || command -v nodejs)" "$0" "$@" |
3 | // http://unix.stackexchange.com/questions/65235/universal-node-js-shebang |
4 | // vi: ft=javascript |
5 | |
6 | const appName = process.env.appName |
7 | const config = require('ssb-config/inject')(appName) |
8 | const ssbClient = require('ssb-client') |
9 | const keys = require('ssb-keys') |
10 | .loadOrCreateSync(require('path').join(config.path, 'secret')) |
11 | const Viz = require('.') |
12 | |
13 | config.listenAddr = config._[1] |
14 | config.appName = appName |
15 | |
16 | require('ssb-reconnect')(function (cb) { |
17 | ssbClient(keys, config, cb) |
18 | }, function (err, ssb, reconnect) { |
19 | if (err) throw err |
20 | Viz.init(ssb, config, reconnect) |
21 | }) |
22 |
Built with git-ssb-web