I'm renewing my discord.js bot folder hirarchy. To make in more structured I made a folder "src" with all js-files. Now if I want to readFileSync a json file outside the src-folder, I can't figure out how to do it. Lets imagine this Folder:
Folder {
src {
commands {
ping.js
}
main.js
}
config1.json
database {
config2.json
}
}
I use this command to read a json file:
const config1 = JSON.parse(fs.readFileSync("____config1.json", "utf-8"));
const config2 = JSON.parse(fs.readFileSync("____config2.json", "utf-8"));
I hope my folder illustration was clear. Can someone help me how to access both of those files? The underscores are the missing characters
Thanks in advance!