Commit 185726ad095a6c5929db01ebe9fd455cee110ebc
Merge branch 'master' of github.com:ticktackim/ticktack-wp1 into mandarin
mix irving committed on 8/21/2017, 8:52:46 AMParent: 453934416f185d2a473203da01c31cc7ea36e1aa
Parent: 1d5204eb5cf8d3b7004c01b71b184796a5582121
Files changed
README.md | changed |
config.js | changed |
main.js | changed |
default-config.json | added |
README.md | ||
---|---|---|
@@ -1,13 +1,12 @@ | ||
1 | 1 | # Ticktack |
2 | 2 | |
3 | 3 | ## Planning |
4 | 4 | |
5 | -Workplan 1 : https://hackmd.io/BwZhCYHZwNgFgLRxAU0XAhjECCcBGSDBGSfOSEDAE2oDMBWXIA==?view# | |
5 | +Workplan 1 | |
6 | 6 | |
7 | -Trello : https://trello.com/b/93eXDvVP/ticktack | |
7 | +Trello | |
8 | 8 | |
9 | - | |
10 | 9 | ## Development |
11 | 10 | |
12 | 11 | ### Repos |
13 | 12 |
config.js | ||
---|---|---|
@@ -3,15 +3,9 @@ | ||
3 | 3 | const ssbKeys = require('ssb-keys') |
4 | 4 | const Path = require('path') |
5 | 5 | |
6 | 6 | const appName = 'ssb' //'ticktack-ssb' |
7 | -const opts = process.env.ssb_appname== 'ssb' ? {} :{ | |
8 | - port: 43750, | |
9 | - blobsPort: 43751, | |
10 | - ws: { | |
11 | - port: 43751 | |
12 | - } | |
13 | -} | |
7 | +const opts = process.env.ssb_appname== 'ssb' ? {} : require('./default-config.json') | |
14 | 8 | |
15 | 9 | exports.gives = nest('config.sync.load') |
16 | 10 | exports.create = (api) => { |
17 | 11 | var config |
@@ -25,4 +19,5 @@ | ||
25 | 19 | } |
26 | 20 | return config |
27 | 21 | }) |
28 | 22 | } |
23 | + |
main.js | ||
---|---|---|
@@ -30,16 +30,21 @@ | ||
30 | 30 | require('patchcore') |
31 | 31 | ) |
32 | 32 | |
33 | 33 | const api = entry(sockets, nest({ |
34 | - 'app.html.app': 'first', | |
35 | - 'invite.async.autofollow': 'first' | |
34 | + 'app.html.app': 'first', | |
35 | + 'invite.async.autofollow': 'first', | |
36 | + 'config.sync.load': 'first' | |
36 | 37 | })) |
37 | 38 | |
38 | 39 | document.body.appendChild(api.app.html.app()) |
39 | 40 | |
40 | -api.invite.async.autofollow( | |
41 | - 'wx.larpa.net:8008:@DTNmX+4SjsgZ7xyDh5xxmNtFqa6pWi5Qtw7cE8aR9TQ=.ed25519~YIRnryeLBhtBa2il9fCWDlAIFWR37Uh63Vep0L6tk6c=', | |
42 | - function (err, follows) { | |
43 | - console.log('autofollowed', err, follows); | |
44 | -}) | |
41 | +var invite = api.config.sync.load().autoinvite | |
42 | +if(invite) | |
43 | + api.invite.async.autofollow( | |
44 | + invite, | |
45 | + function (err, follows) { | |
46 | + console.log('autofollowed', err, follows); | |
47 | + }) | |
48 | +else | |
49 | + console.log('no invite') | |
45 | 50 |
default-config.json | ||
---|---|---|
@@ -1,0 +1,9 @@ | ||
1 | +{ | |
2 | + "port": 43750, | |
3 | + "blobsPort": 43751, | |
4 | + "ws": { "port": 43751 }, | |
5 | + "caps": {"shs": "ErgQF85hFQpUXp69IXtLW+nXDgFIOKKDOWFX/st2aWk="}, | |
6 | + "autoinvite": "128.199.132.182:43750:@7xMrWP8708+LDvaJrRMRQJEixWYp4Oipa9ohqY7+NyQ=.ed25519~YC4ZnjHH8qzsyHe2sihW8WDlhxSUH33IthOi4EsldwQ=" | |
7 | +} | |
8 | + | |
9 | + |
Built with git-ssb-web