Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrepol742 committed Mar 26, 2024
1 parent a8a7270 commit eede4df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,18 @@ mmmmm m mm mmm mmmm mmm # #" m"# " "#
let folder_dir = ["/cache", "/data", "/data/cookies", "/log"];
for (let folder in folder_dir) {
writeFolder(__dirname + folder_dir[folder]);
utils.logged("creating_dir " + __dirname + folder_dir[folder]);
}

let data_json = ["groups", "accountPreferences", "threadPreferences", "users"];
for (let file in data_json) {
writeFile(__dirname + "/data/" + data_json[file] + ".json", fs.readFileSync(__dirname + "/src/data/default/" + data_json[file] + ".json", "utf8"));
utils.logged("writing_data " + __dirname + data_json[file]);
}

if (!fs.existsSync(__dirname + "/.env")) {
fs.writeFileSync(__dirname + "/.env", fs.readFileSync(__dirname + "/.env.example", "utf8"), "utf8");
utils.logged("writing_env " + __dirname + "/.env");
}

/*
Expand Down

0 comments on commit eede4df

Please sign in to comment.