Initialise() imports fs (bug fix)

This commit is contained in:
2025-08-09 12:44:39 +01:00
parent 3e2a63bfd7
commit df4bc99d9a

View File

@@ -1,8 +1,11 @@
import·{·createRequire·}·from·'module';
const·require·=·createRequire(import.meta.url)
// Initialise the program by creating users.js, comments.js, posts.js and config.js
// All require default content in them to start off with
// Then exit successfully
// returns nothing
export function initialise() {
const fs = require("fs");
try {
const users = require("../data/users.js");
}