Skip to content

Commit 461bd87

Browse files
committed
consul
1 parent 37f78aa commit 461bd87

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

srv/npm-prod.js

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
/* Copyright (c) 2014-2017 Richard Rodger and other contributors, MIT License */
22

3-
var BASES = process.env.BASES.split(',')
3+
//var BASES = process.env.BASES.split(',')
4+
var CONSUL = process.env.CONSUL_SERVICE_HOST || 'localhost'
45

56
var Seneca = require('seneca')
67

78
Seneca({tag: 'npm'})
89
.test('print')
910

11+
.use('consul-registry', {
12+
host: CONSUL
13+
})
14+
15+
1016
.use('entity')
1117
.use('jsonfile-store', {folder: __dirname+'/../data'})
1218

@@ -31,7 +37,12 @@ Seneca({tag: 'npm'})
3137
{pin: 'role:npm'},
3238
{pin: 'role:info,need:part', model:'observe'}
3339
],
34-
bases: BASES,
40+
//bases: BASES,
3541
host: '@eth0',
36-
sneeze: {silent:false}
42+
//sneeze: {silent:false},
43+
discover: {
44+
registry: {
45+
active: true
46+
}
47+
}
3748
})

0 commit comments

Comments
 (0)