From 5dd353243cc78a13f74860f54285cfda7605e222 Mon Sep 17 00:00:00 2001 From: Dustyn Blackmore Date: Wed, 18 Apr 2018 10:38:51 +1000 Subject: [PATCH] Restructure Renamed nft rules for file list layout benefits. Updated references to this. Updated index.js Fixed error with readfile of changes to rules. --- src/config/{base.rules => rules-base.nft} | 0 src/config/{locked.rules => rules-locked.nft} | 0 src/index.js | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/config/{base.rules => rules-base.nft} (100%) rename src/config/{locked.rules => rules-locked.nft} (100%) diff --git a/src/config/base.rules b/src/config/rules-base.nft similarity index 100% rename from src/config/base.rules rename to src/config/rules-base.nft diff --git a/src/config/locked.rules b/src/config/rules-locked.nft similarity index 100% rename from src/config/locked.rules rename to src/config/rules-locked.nft diff --git a/src/index.js b/src/index.js index 1efbe49..c10dba8 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ let ruleWatch = fs.watch('./src/config', () => { setTimeout(loadRules, 500) }); function loadRules (err, filename) { console.log('Detected ' + filename + ' change. Ingesting.'); - fs.readFile('./config/rules.json', 'utf8', (err, data) => { + fs.readFile('./src/config/rules.json', 'utf8', (err, data) => { if (err) throw err; let newRules = JSON.parse(data); rules = newRules.rules; @@ -162,7 +162,7 @@ function bindQueueHandlers () { } nft.flush().then( - (resolved) => nft.inject('./src/config/base.rules'), + (resolved) => nft.inject('./src/config/rules-base.nft'), (reject) => console.log('failed to flush rules') ).then( (resolved) => setupInterfaces(),