Home
/
river.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c441c3
)
force a default of 6 hours of articles on a fresh load
author
xangelo
<me@xangelo.ca>
Fri, 26 Jan 2024 21:22:17 +0000
(16:22 -0500)
committer
xangelo
<me@xangelo.ca>
Fri, 26 Jan 2024 21:22:17 +0000
(16:22 -0500)
src/server.ts
patch
|
blob
|
history
diff --git
a/src/server.ts
b/src/server.ts
index 0c931758b572238b1d4567fb05587409d6e74643..579f3ee99467dc0b24993093f5daeb6c8378a6b0 100644
(file)
--- a/
src/server.ts
+++ b/
src/server.ts
@@
-99,7
+99,8
@@
app.get('/river', async (req, res) => {
const displayedItems = req.header('entry-count');
let firstLoad = true;
- let createdAt = Math.floor(Date.now()/1000 - (60 * 60));
+ const freshReadInHours = parseInt(process.env.FRESH_READ_IN_HOURS) || 6;
+ let createdAt = Math.floor(Date.now()/1000 - ((60 * 60) * freshReadInHours));
if(!displayedItems) {
const temp = parseInt(header);