git ssb

2+

mixmix / ticktack



Commit 47c8e73a3d93e51d2d4b4db1736270f2e2f76842

changes for running on ssb network

mix irving committed on 8/25/2017, 11:52:49 PM
Parent: f44ca8978a5875246affb21564a0f0ac3faedbad

Files changed

assets/icon.pngchanged
config.jschanged
main.jschanged
assets/icon.png
assets/icon.png
config.jsView
@@ -2,22 +2,23 @@
22 const nest = require('depnest')
33 const ssbKeys = require('ssb-keys')
44 const Path = require('path')
55
6-const appName = 'ticktack'
7-const opts = process.env.ssb_appname== 'ssb' ? {} : require('./default-config.json')
6+const appName = process.env.ssb_appname || 'ssb' //'ticktack' TEMP: this is for the windowsSSB installer only
7+const opts = appName == 'ssb'
8+ ? { "port": 43750, "blobsPort": 43751, "ws": { "port": 43751 } }
9+ : require('./default-config.json')
810
911 exports.gives = nest('config.sync.load')
1012 exports.create = (api) => {
1113 var config
1214 return nest('config.sync.load', () => {
1315 if (!config) {
14- config = Config(process.env.ssb_appname || appName, opts)
16+ config = Config(appName, opts)
1517 config.keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret'))
1618
1719 // HACK: fix offline on windows by specifying 127.0.0.1 instead of localhost (default)
1820 config.remote = `net:127.0.0.1:${config.port}~shs:${config.keys.id.slice(1).replace('.ed25519', '')}`
1921 }
2022 return config
2123 })
2224 }
23-
main.jsView
@@ -38,14 +38,13 @@
3838 }))
3939
4040 document.body.appendChild(api.app.html.app())
4141
42-var invite = api.config.sync.load().autoinvite
43-if(invite)
44- api.invite.async.autofollow(
45- invite,
46- function (err, follows) {
47- console.log('autofollowed', err, follows);
48- })
49-else
50- console.log('no invite')
51-
42+// var invite = api.config.sync.load().autoinvite
43+// if(invite)
44+// api.invite.async.autofollow(
45+// invite,
46+// function (err, follows) {
47+// console.log('autofollowed', err, follows);
48+// })
49+// else
50+// console.log('no invite')

Built with git-ssb-web