Files: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79 / browser.js
456 bytesRaw
1 | const pull = require('pull-stream') |
2 | const { entry } = require('inu') |
3 | const { update } = require('yo-yo') |
4 | const start = require('inu-engine') |
5 | |
6 | const app = require('./lib/app') |
7 | |
8 | module.exports = startBrowser |
9 | |
10 | function startBrowser () { |
11 | const sockets = app() |
12 | const store = entry(sockets) |
13 | const { views } = start(store) |
14 | const main = document.createElement('div') |
15 | document.body.appendChild(main) |
16 | pull(views(), pull.drain(update.bind(null, main))) |
17 | } |
18 |
Built with git-ssb-web