Files: 8924bfbcacd7157fc95e73da83a1f17630e189ea / serve.js
613 bytesRaw
1 | var http = require('http'); |
2 | var serve = require('ecstatic'); |
3 | var client = require('ssb-client') |
4 | var party = require('ssb-party') |
5 | |
6 | opts = {"allowPrivate": true} |
7 | |
8 | party(opts, function (err, sbot) { |
9 | http.createServer( |
10 | serve({ root: __dirname + '/build/'}) |
11 | ).listen(3013) |
12 | |
13 | opts = {"modern": true} |
14 | |
15 | client(function (err, sbot) { |
16 | if(err) throw err |
17 | sbot.invite.create(opts, function (err, invite) { |
18 | if(err) throw err |
19 | var lite = invite |
20 | console.log('Your lite client is now listening at http://localhost:3013\nHere\'s an invite\nhttp://localhost:3013#' + invite) |
21 | }) |
22 | }) |
23 | }) |
24 | |
25 |
Built with git-ssb-web