Unfortunately, the fs.writeFile does not accept an array for creating a bunch of files at once. To solve this problem, put all files in an array and loop through them to create the files.
var fs = require('fs');
Using the ‘path’ variable along with some array operations, the folder one level above the current directory could be found. The value of ‘1’ goes up one level, but this value could be changed to go up as many level as desired.
var path = require('path');