const serverPath = require("./serverPath.js") const boards = require(serverPath+"/board/boards.js"); const fs = require("fs"); const { pageTop, pageBottom } = require(serverPath+"/html.js") const { exec } = require("child_process"); console.log(boards); for (let board = 0; board < boards.length; board++) { let boardPath = `${serverPath}/board/${boards[board]}/index.html`; fs.readFile(boardPath, (err, data) => { if (err) { console.log(`File /${boards[board]}/index.html doesn't exist... Creating`) fs.writeFile(`${boardPath}`,`