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 // Initialise the program by creating users.js, comments.js, posts.js and config.js
// All require default content in them to start off with // All require default content in them to start off with
// Then exit successfully // Then exit successfully
// returns nothing // returns nothing
export function initialise() { export function initialise() {
const fs = require("fs");
try { try {
const users = require("../data/users.js"); const users = require("../data/users.js");
} }