git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 0ffc6fc10c1af43e37b9fbb3018129257b894951

Files: 0ffc6fc10c1af43e37b9fbb3018129257b894951 / example / index.js

767 bytesRaw
1const combine = require('depject')
2const apply = require('depject/apply')
3const h = require('mutant/h')
4const fs = require('fs')
5
6const modules = require('../')
7var api = entry(combine(modules))
8
9// TODO depject.entry(sockets, {
10// render_feed: 'first',
11// feeds: {
12// public: 'first'
13// }
14// })()
15
16require('insert-css')(fs.readFileSync(__dirname + '/styles.css', 'utf8'))
17
18var app = h('div.App', [
19 api.feed.html.render(api.feed.pull.public)
20])
21
22document.head.appendChild(h('title', 'PATCHCORE :: Example'))
23document.body.appendChild(app)
24
25function entry (sockets) {
26 return {
27 feed: {
28 html: {
29 render: apply.first(sockets.feed.html.render)
30 },
31 pull: {
32 public: apply.first(sockets.feed.pull.public)
33 }
34 }
35 }
36}
37

Built with git-ssb-web