aboutsummaryrefslogtreecommitdiffhomepage
path: root/initializers/checker.js
diff options
context:
space:
mode:
Diffstat (limited to 'initializers/checker.js')
-rw-r--r--initializers/checker.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/initializers/checker.js b/initializers/checker.js
index 7a3a53616..7a09c02d1 100644
--- a/initializers/checker.js
+++ b/initializers/checker.js
@@ -4,10 +4,13 @@
4 var config = require('config') 4 var config = require('config')
5 var mkdirp = require('mkdirp') 5 var mkdirp = require('mkdirp')
6 6
7 var checker = {} 7 var checker = {
8 checkConfig: checkConfig,
9 createDirectoriesIfNotExist: createDirectoriesIfNotExist
10 }
8 11
9 // Check the config files 12 // Check the config files
10 checker.checkConfig = function () { 13 function checkConfig () {
11 var required = [ 'listen.port', 14 var required = [ 'listen.port',
12 'webserver.https', 'webserver.host', 'webserver.port', 15 'webserver.https', 'webserver.host', 'webserver.port',
13 'database.host', 'database.port', 'database.suffix', 16 'database.host', 'database.port', 'database.suffix',
@@ -25,7 +28,7 @@
25 } 28 }
26 29
27 // Create directories for the storage if it doesn't exist 30 // Create directories for the storage if it doesn't exist
28 checker.createDirectoriesIfNotExist = function () { 31 function createDirectoriesIfNotExist () {
29 var storages = config.get('storage') 32 var storages = config.get('storage')
30 33
31 for (var key of Object.keys(storages)) { 34 for (var key of Object.keys(storages)) {
@@ -40,6 +43,7 @@
40 } 43 }
41 } 44 }
42 45
43 // ----------- Export ----------- 46 // ---------------------------------------------------------------------------
47
44 module.exports = checker 48 module.exports = checker
45})() 49})()