write .ssb/manifest.json on start

This commit is contained in:
Paul Frazee 2015-08-13 15:43:51 -05:00
parent 67713ee1e7
commit d30e3227ad

View File

@ -2,6 +2,7 @@ var app = require('app')
var Menu = require('menu')
var path = require('path')
var http = require('http')
var fs = require('fs')
var windows = require('./lib/windows')
var config = require('ssb-config')
@ -28,6 +29,12 @@ app.on('ready', function () {
var rebuild = false
var sbot = createSbot(config)
// write manifest file
fs.writeFileSync(
path.join(config.path, 'manifest.json'),
JSON.stringify(sbot.getManifest(), null, 2)
)
// setup blob and file serving
var blobs = require('./lib/blobs')(sbot, { blobs_dir: path.join(config.path, 'blobs'), checkout_dir: app.getPath('userDesktop') })
http.createServer(blobs.server({ serveFiles: false })).listen(7777)