git ssb


Dominic / electroapp

Tree: 07d2aaad9ac4cc9e287f8e03dfe2557fbaeb8680

Files: 07d2aaad9ac4cc9e287f8e03dfe2557fbaeb8680 /

1606 bytesRaw


Run a depject app within electron, the native addons needed for an interesting p2p app are bundled in (leveldown, chloride) so that they do not need to be installed with npm.

start electroapp with the layers needed as cli arguments. since depject-scripts is used, so each entry point needs to start with a call to expose

  gives: ..., needs: ..., create: ...

or it can be a nested collection of modules

  foo: {gives,needs,create},
  bar: {gives,needs,create},

There must be a module that gives an app method, this will be called to start the app. (the app method is responsible to adding itself to the dom, etc)

I used this command (with an already running sbot)

electroapp --sbot [ ../scuttlebot/expose.js ] --patch [ ../patchcore/expose.js ../picknmix/expose.js ./app.js]

(I added expose methods to patchcore, picknmix and scuttlebot, but they did not give app so app.js gives that)

I want to rewrite scuttlebot to use depject, but havn't started that yet.


electroapp --{name} [ layers... {options} ]

One or more apps may be provided. Any option taken by BrowserWindow
may be passed to a layer. --dev to enable dev tools, --dev detach to show tools as separate window.

to do

Store the layers in some sort of file, and be able to add to those via the cli etc. Also, figure out a way to curate a changing layer or changing layers (as browserify bundles)



Built with git-ssb-web