??
This commit is contained in:
parent
5307271445
commit
d8c19bd0ab
1 changed files with 1 additions and 12 deletions
13
index.js
13
index.js
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue