From d75a74b7a8a886d8be923c7aa022898da2f0de6e Mon Sep 17 00:00:00 2001 From: deadvey Date: Sun, 13 Jul 2025 00:41:59 +0100 Subject: [PATCH] fixed copy error bug --- app.js | 10 ++++++---- hitcount.txt | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index d17ef49..9cb4421 100755 --- a/app.js +++ b/app.js @@ -57,21 +57,23 @@ function initialise() { fs.writeFileSync(`${__dirname}/posts.js`, `export const posts = []`) } try { - const users = require("./comments.js"); + const comments = require("./comments.js"); } catch (error) { console.log("Creating comments file") fs.writeFileSync(`${__dirname}/comments.js`, `export const comments = []\nexport const counter = 0`) } try { - const users = require("./config.js"); + const config = require("./config.js"); } catch (error) { console.log("Copying the example config to config.js") console.log("!!! PLEASE MODIFY config.js TO YOUR NEEDS !!!") - fs.copyFile('example-config.js', 'config.js') + fs.copyFile('example-config.js', 'config.js', (err) => { + console.log("Error copying file") + }) } - process.exit() + process.exit(0) } function get_userID(username) { diff --git a/hitcount.txt b/hitcount.txt index b6e2760..e0c1820 100644 --- a/hitcount.txt +++ b/hitcount.txt @@ -1 +1 @@ -242 \ No newline at end of file +244 \ No newline at end of file