Browse Source

write .ssb/manifest.json on start

Paul Frazee 5 years ago
parent
commit
d30e3227ad
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      app/index.js

+ 7
- 0
app/index.js View File

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

Loading…
Cancel
Save