This commit is contained in:
Bingus_Violet 2024-01-05 15:33:37 -06:00
parent 5307271445
commit d8c19bd0ab

View file

@ -33,18 +33,7 @@ app.listen(PORT, () => {
})
function pageUpdate() {
var postsArray = fs.readdirSync(postsPath, function(err, files){
files = files.map(function (fileName) {
return {
name: fileName,
time: fs.statSync(dir + '/' + fileName).mtime.getTime()
};
})
.sort(function (a, b) {
return a.time - b.time; })
.map(function (v) {
return v.name; });
})
var postsArray = fs.readdirSync(postsPath)
var posts = {}
for (let index = 0; index < postsArray.length; index++) {