Update server.js
Browse files
server.js
CHANGED
|
@@ -4,7 +4,7 @@ const apicache = require('apicache'); // Import apicache
|
|
| 4 |
const cors = require('cors');
|
| 5 |
|
| 6 |
const app = express();
|
| 7 |
-
const port = process.env.PORT ||
|
| 8 |
|
| 9 |
const cache = apicache.middleware;
|
| 10 |
const cacheDuration = '15 minutes'; // Cache duration
|
|
@@ -64,3 +64,6 @@ app.get('/api/raceResults', async (req, res) => {
|
|
| 64 |
}
|
| 65 |
});
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
const cors = require('cors');
|
| 5 |
|
| 6 |
const app = express();
|
| 7 |
+
const port = process.env.PORT || 7860;
|
| 8 |
|
| 9 |
const cache = apicache.middleware;
|
| 10 |
const cacheDuration = '15 minutes'; // Cache duration
|
|
|
|
| 64 |
}
|
| 65 |
});
|
| 66 |
|
| 67 |
+
app.listen(port, () => {
|
| 68 |
+
console.log(`Server running on port ${port}`);
|
| 69 |
+
});
|