Commit 097b9b8f authored by Suhaimi Amir's avatar Suhaimi Amir

add namespace to cote

parent 67c09047
Pipeline #1192 passed with stage
in 34 seconds
const configServer = require('cote-requester')('config', `${Math.random().toString(36).substring(7)} Config Lib : Reqs`);
const cote = require('cote');
const logger = require('logger');
const configServer = new cote.Requester({
name: `${Math.random().toString(36).substring(7)} Config Lib : Reqs`,
key: 'config',
namespace: 'config',
});
let configSubscriber = null;
exports.get = async (name) => {
......@@ -44,7 +49,7 @@ exports.onChange = (name, files = []) => {
}
if (configSubscriber === null) { // only run if we're listening to changes
configSubscriber = new cote.Subscriber({ name: 'Config Lib : Subs', key: 'config' });
configSubscriber = new cote.Subscriber({ name: 'Config Lib : Subs', key: 'config', namespace: 'config' });
}
configSubscriber.on('config.update', (config) => {
......
{
"name": "config",
"version": "1.0.5",
"version": "1.0.6",
"description": "Config getter/parser",
"main": "index.js",
"scripts": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment