Initialise() imports fs (bug fix)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user