git ssb

30+

cel / git-ssb-web



Tree: 44a77101e9503b7c951bb7ac51d0c8cc6a938e4b

Files: 44a77101e9503b7c951bb7ac51d0c8cc6a938e4b / server.js

713 bytesRaw
1#!/bin/sh
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
6var appName = 'ssb_appname' in process.env ? process.env.ssb_appname :
7 require('child_process').spawnSync('git', ['config', 'ssb.appname'],
8 {encoding: 'utf8'}).stdout.trim()
9var config = require('ssb-config/inject')(appName)
10var ssbClient = require('ssb-client')
11var keys = require('ssb-keys')
12 .loadOrCreateSync(require('path').join(config.path, 'secret'))
13var Web = require('.')
14
15config.listenAddr = config._[1]
16config.appname = appName
17
18ssbClient(keys, config, function (err, ssb) {
19 if (err) throw err
20 Web.init(ssb, config)
21})
22

Built with git-ssb-web