init.initialise() checks for correct path of config.json (bug fix)
This commit is contained in:
@@ -28,12 +28,12 @@ export function initialise() {
|
||||
fs.writeFileSync(`../data/comments.json`, `{\n"comments": [],\n"counter": 0}`)
|
||||
}
|
||||
try {
|
||||
const config = require("../data/config.json");
|
||||
const config = require("../config.json");
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Copying the example config to config.js")
|
||||
console.log("!!! PLEASE MODIFY config.js TO YOUR NEEDS !!!")
|
||||
fs.copyFile('example-config.json', 'config.json', (err) => {
|
||||
console.log("!!! PLEASE MODIFY config.json TO YOUR NEEDS !!!")
|
||||
fs.copyFile('../example-config.json', '../config.json', (err) => {
|
||||
console.log("Error copying file")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user