Only one config for client and server.

This commit is contained in:
Your Name 2014-06-06 21:22:57 +02:00
parent 46717e14ae
commit a2723c6b12
8 changed files with 62 additions and 28 deletions
server/services

View file

@ -16,7 +16,7 @@ angular.module('ffffng')
}
function findNodeFiles(pattern) {
return glob.sync(config.peersPath + '/' + pattern.toLowerCase());
return glob.sync(config.server.peersPath + '/' + pattern.toLowerCase());
}
function isDuplicate(pattern, token) {
@ -52,7 +52,7 @@ angular.module('ffffng')
function writeNodeFile(isUpdate, token, node, callback) {
var filename =
config.peersPath + '/' + (node.hostname + '@' + node.mac + '@' + node.key + '@' + token).toLowerCase();
config.server.peersPath + '/' + (node.hostname + '@' + node.mac + '@' + node.key + '@' + token).toLowerCase();
var data = '';
_.each(linePrefixes, function (prefix, key) {