From d92635223a233a1bc8d15e6b1d83e50fa74e5e32 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 7 Mar 2017 20:36:54 -0500 Subject: Pass config as opts --- package.json | 3 ++- server.js | 4 +++- 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) }) -- cgit v1.2.3