Update server.js
Browse files
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(
|
| 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 |
+
});
|