Commit 47c8e73a3d93e51d2d4b4db1736270f2e2f76842
changes for running on ssb network
mix irving committed on 8/25/2017, 11:52:49 PMParent: f44ca8978a5875246affb21564a0f0ac3faedbad
Files changed
assets/icon.png | changed |
config.js | changed |
main.js | changed |
assets/icon.png |
---|
config.js | ||
---|---|---|
@@ -2,22 +2,23 @@ | ||
2 | 2 | const nest = require('depnest') |
3 | 3 | const ssbKeys = require('ssb-keys') |
4 | 4 | const Path = require('path') |
5 | 5 | |
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') | |
8 | 10 | |
9 | 11 | exports.gives = nest('config.sync.load') |
10 | 12 | exports.create = (api) => { |
11 | 13 | var config |
12 | 14 | return nest('config.sync.load', () => { |
13 | 15 | if (!config) { |
14 | - config = Config(process.env.ssb_appname || appName, opts) | |
16 | + config = Config(appName, opts) | |
15 | 17 | config.keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret')) |
16 | 18 | |
17 | 19 | // HACK: fix offline on windows by specifying 127.0.0.1 instead of localhost (default) |
18 | 20 | config.remote = `net:127.0.0.1:${config.port}~shs:${config.keys.id.slice(1).replace('.ed25519', '')}` |
19 | 21 | } |
20 | 22 | return config |
21 | 23 | }) |
22 | 24 | } |
23 | - |
main.js | ||
---|---|---|
@@ -38,14 +38,13 @@ | ||
38 | 38 | })) |
39 | 39 | |
40 | 40 | document.body.appendChild(api.app.html.app()) |
41 | 41 | |
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