ardasen commited on
Commit
e925622
·
verified ·
1 Parent(s): 97e1103

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +2 -2
server.js CHANGED
@@ -6,7 +6,7 @@ const cors = require('cors');
6
 
7
  const app = express();
8
  const port = process.env.PORT || 7860;
9
- const cache = new NodeCache({ stdTTL: 900 }); // Cache TTL is 15 minutes
10
 
11
  const ERGAST_API_BASE_URL = 'https://ergast.com/api/f1/';
12
 
@@ -90,4 +90,4 @@ app.get('/api/raceResults', async (req, res) => {
90
  // Start server
91
  app.listen(port, () => {
92
  console.log(`Server running on port ${port}`);
93
- });
 
6
 
7
  const app = express();
8
  const port = process.env.PORT || 7860;
9
+ const cache = new NodeCache(); // Remove stdTTL to prevent automatic expiration
10
 
11
  const ERGAST_API_BASE_URL = 'https://ergast.com/api/f1/';
12
 
 
90
  // Start server
91
  app.listen(port, () => {
92
  console.log(`Server running on port ${port}`);
93
+ });