-
Notifications
You must be signed in to change notification settings - Fork 1
/
ssb-server-local.js
62 lines (54 loc) · 1.23 KB
/
ssb-server-local.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var Server = require('ssb-server')
var ssbKeys = require('ssb-keys')
var Config = require('ssb-config/inject')
var host = "::"
var config = Config('ssb', {
blobsPort: 9000,
local: true,
permissions:
{
allow: null,
deny: null
},
logging:
{
level: "info"
},
connections: { incoming: {
net: [{
host: host,
port: 8008,
scope: ['device', 'local', 'public'],
transform: 'shs',
}],
ws: [{
host: host,
port: 8989,
scope: ['device', 'local', 'public'],
transform: 'shs',
"http": true
}]
}}
})
var keys = ssbKeys.loadOrCreateSync("secret")
config.keys = keys
// add plugins
Server
.use(require('./ssb-trusting'))
.use(require('ssb-clingy'))
.use(require('./ssb-geo-db'))
.use(require('ssb-server/plugins/plugins'))
.use(require('ssb-gossip'))
.use(require('ssb-replicate'))
.use(require('ssb-friends'))
.use(require('ssb-backlinks'))
.use(require('ssb-query'))
.use(require('ssb-blobs'))
.use(require('ssb-links'))
.use(require('ssb-ws'))
.use(require('ssb-ebt'))
.use(require('ssb-ooo'))
.use(require('ssb-server/plugins/local'))
// .use(geoDB)
var server = Server(config)
// console.log(server.manifest())