Commit 7ec8576dc1fa3f5fd84478f8aa7f3ea3c6805c81
dont add sockets for windows at the moment
mixmix committed on 11/8/2018, 10:01:51 PMParent: fbeb26bad2f96cc85202a94623d26c0c6539b0be
Files changed
config.js | changed |
config.js | ||
---|---|---|
@@ -1,9 +1,8 @@ | ||
1 | 1 … | const nest = require('depnest') |
2 | 2 … | const Config = require('ssb-config/inject') |
3 | 3 … | const ssbKeys = require('ssb-keys') |
4 | 4 … | const Path = require('path') |
5 | -const merge = require('lodash/merge') | |
6 | 5 … | |
7 | 6 … | const appName = process.env.ssb_appname || 'ssb' |
8 | 7 … | const opts = appName === 'ssb' |
9 | 8 … | ? null |
@@ -19,15 +18,17 @@ | ||
19 | 18 … | |
20 | 19 … | const keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret')) |
21 | 20 … | const pubkey = keys.id.slice(1).replace(`.${keys.curve}`, '') |
22 | 21 … | |
23 | - config = merge(config, { | |
24 | - connections: { | |
25 | - incoming: { unix: [{ 'scope': 'local', 'transform': 'noauth' }] } | |
26 | - }, | |
27 | - keys, | |
28 | - remote: `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` | |
29 | - }) | |
22 … | + config.key = keys | |
23 … | + if (!process.platform.startsWith('win')) { | |
24 … | + config.connections = { | |
25 … | + incoming: { | |
26 … | + unix: [{ 'scope': 'local', 'transform': 'noauth' }] | |
27 … | + } | |
28 … | + } | |
29 … | + config.remote = `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` | |
30 … | + } | |
30 | 31 … | } |
31 | 32 … | return config |
32 | 33 … | }) |
33 | 34 … | } |
Built with git-ssb-web