Commit cea37bb07519a0522556a3f190e854b8943fb367
latest
Tree committed on 12/14/2016, 5:30:47 AMParent: d2d879c5cd926401369c0bdc4b092d54f390d23e
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -1,19 +1,16 @@ | ||
1 | 1 … | var secretStack = require('secret-stack') |
2 | 2 … | var keys = require('./keys.json') |
3 | -var appkey = require('./appkeys.json') | |
4 | 3 … | var muxrpc = require('muxrpc') |
5 | 4 … | var ms = require('multiserver') |
6 | 5 … | var mdns = require('bonjour')() |
7 | 6 … | |
8 | 7 … | var createApp = secretStack({ |
9 | - appKey: appkey.private | |
8 … | + appKey: new Buffer('00000000000000000000000000000000') | |
10 | 9 … | }).use({ |
11 | 10 … | name: 'spot', |
12 | 11 … | manifest: { |
13 | - public: { | |
14 | - greet: 'async' | |
15 | - } | |
12 … | + greet: 'async' | |
16 | 13 … | }, |
17 | 14 … | permissions: { |
18 | 15 … | anonymous: ['public.greet'] |
19 | 16 … | }, |
@@ -44,9 +41,9 @@ | ||
44 | 41 … | if(service.host === node.getAddress()) return |
45 | 42 … | else{ |
46 | 43 … | node.connect(service.host, function(err, rpc){ |
47 | 44 … | console.log(err, rpc) |
48 | - rpc.public.greet(function(err, greets){ | |
45 … | + rpc.spot.greet(function(greets){ | |
49 | 46 … | console.log(greets) |
50 | 47 … | }) |
51 | 48 … | }) |
52 | 49 … | } |
Built with git-ssb-web