git ssb

16+

Dominic / patchbay



Commit 3b8af4cbe35ccf838eead48bbab57bb35ac00709

revert config to use merge

mixmix committed on 11/8/2018, 11:00:40 PM
Parent: 557f4b880701243b85fff447aa30939faf97a997

Files changed

config.jschanged
config.jsView
@@ -1,8 +1,9 @@
11 const nest = require('depnest')
22 const Config = require('ssb-config/inject')
33 const ssbKeys = require('ssb-keys')
44 const Path = require('path')
5 +const merge = require('lodash/merge')
56
67 const appName = process.env.ssb_appname || 'ssb'
78 const opts = appName === 'ssb'
89 ? null
@@ -17,18 +18,20 @@
1718 config = Config(appName, opts)
1819
1920 const keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret'))
2021 const pubkey = keys.id.slice(1).replace(`.${keys.curve}`, '')
22 + const socketSettings = (process.platform.startsWith('win'))
23 + ? {}
24 + : {
25 + connections: {
26 + incoming: {
27 + unix: [{ 'scope': 'local', 'transform': 'noauth' }]
28 + }
29 + },
30 + remote: `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}`
31 + }
2132
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- }
33 + merge(config, { keys }, socketSettings)
3134 }
3235 return config
3336 })
3437 }

Built with git-ssb-web