write .ssb/manifest.json on start
This commit is contained in:
parent
67713ee1e7
commit
d30e3227ad
@ -2,6 +2,7 @@ var app = require('app')
|
|||||||
var Menu = require('menu')
|
var Menu = require('menu')
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
var http = require('http')
|
var http = require('http')
|
||||||
|
var fs = require('fs')
|
||||||
|
|
||||||
var windows = require('./lib/windows')
|
var windows = require('./lib/windows')
|
||||||
var config = require('ssb-config')
|
var config = require('ssb-config')
|
||||||
@ -28,6 +29,12 @@ app.on('ready', function () {
|
|||||||
var rebuild = false
|
var rebuild = false
|
||||||
var sbot = createSbot(config)
|
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
|
// setup blob and file serving
|
||||||
var blobs = require('./lib/blobs')(sbot, { blobs_dir: path.join(config.path, 'blobs'), checkout_dir: app.getPath('userDesktop') })
|
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)
|
http.createServer(blobs.server({ serveFiles: false })).listen(7777)
|
||||||
|
Loading…
Reference in New Issue
Block a user