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
|
// 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");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user