aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-07 20:36:54 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-08 12:09:00 -0500
commitd92635223a233a1bc8d15e6b1d83e50fa74e5e32 (patch)
tree8d569498198469ecba85f0de440cbbc6f19bea8f
parent606ff997bc4249d4ef0baae2e6336a739c3d64c7 (diff)
downloadpatchfoo-d92635223a233a1bc8d15e6b1d83e50fa74e5e32.tar.gz
patchfoo-d92635223a233a1bc8d15e6b1d83e50fa74e5e32.zip
Pass config as opts
-rw-r--r--package.json3
-rw-r--r--server.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/package.json b/package.json
index 9bb2c10..f5029cb 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,8 @@
"stream-to-pull-stream": "^1.7.2"
},
"devDependencies": {
- "ssb-client": "^4.4.0"
+ "ssb-client": "^4.4.0",
+ "ssb-config": "^2.2.0"
},
"author": "cel",
"homepage": "https://git.scuttlebot.io/%25YAg1hicat%2B2GELjE2QJzDwlAWcx0ML%2B1sXEdsWwvdt8%3D.sha256",
diff --git a/server.js b/server.js
index 66f503f..b64b14f 100644
--- a/server.js
+++ b/server.js
@@ -1,4 +1,6 @@
-require('ssb-client')(function (err, sbot, config) {
+var createConfig = require('ssb-config/inject')
+var config = createConfig(process.env.ssb_appname)
+require('ssb-client')(config, function (err, sbot) {
if (err) throw err
require('.').init(sbot, config)
})