Files: 8dc25143a3f37f1618f7a92b3c46dec512b43bfd / 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