config-loader.js
/**
         * Startup function that starts to parse and validate the contents of a given 
         * config file.
         */
Startup function that starts to parse and validate the contents of a given
config file.
Startup function that starts to parse and validate the contents of a given config file .
startUp() {
            return new Promise((resolve, reject) => {
                fs.readFile(this.filePath, { encoding: 'utf-8' }, (error, data) => {
                    if (error) {
                        reject(error);
                    } else {
                        this.data = JSON.parse(data);
                        try {
                            this.validateConfig();
                            resolve();
                        } catch (validationError) {
                            reject(validationError);
                        }
                    }
                })
            });
        }
startUp ( ) { return new Promise ( ( resolve , reject ) => { fs . readFile ( this . filePath , { encoding : 'utf-8' } , ( error , data ) => { if ( error ) { reject ( error ) ; } else { this . data = JSON . parse ( data ) ; try { this . validateConfig ( ) ; resolve ( ) ; } catch ( validationError ) { reject ( validationError ) ; } } } ) } ) ; }
Startup function that starts to parse and validate the contents of a given
 config file.
Startup function that starts to parse and validate the contents of a given config file .