import fileSystem from 'fs';

const JsonFileManager = {
    load(fileName) {
        console.log(`[INFO] Loading data from ${__dirname}/${fileName} file`);
        return JSON.parse(fileSystem.readFileSync(`${__dirname}/${fileName}`));
	},
    save(fileName, json) {
        console.log(`[INFO] Saving data in ${__dirname}/${fileName} file`);
        fileSystem.writeFileSync(`${__dirname}/${fileName}`, JSON.stringify(json));
    }
};

export default JsonFileManager;

import fileSystem from 'fs';

const JsonFileManager = {
    load(path) {
        console.log(`[INFO] Loading data from ${path} file`);
        return JSON.parse(fileSystem.readFileSync(`${path}`));
	},
    save(path, json) {
        console.log(`[INFO] Saving data in ${path} file`);
        fileSystem.writeFileSync(`${path}`, JSON.stringify(json));
    }
};

export default JsonFileManager;

Add some changes in path settings for JsonFIleManager
Add some changes in path settings for JsonFIleManager
