Skip to content

Commit 7b9ded9

Browse files
committed
Sort by file times
1 parent 171342e commit 7b9ded9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ app.get('/', (req, res) => {
5151
}));
5252
}));
5353
}).then(files => {
54+
files.sort((a, b) => a.stat.ctime < b.stat.ctime ? 1 : -1);
5455
res.render('index.html', { files });
5556
}).catch(err => {
5657
res.status(500).send(err);

0 commit comments

Comments
 (0)