Skip to content

Commit 140f6f4

Browse files
cleaning
1 parent 02571aa commit 140f6f4

2 files changed

Lines changed: 2 additions & 25 deletions

File tree

src/courses/courseRouter.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/server.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'dotenv/config';
21
import helmet from 'helmet';
32

43
import express from 'express';
@@ -70,14 +69,13 @@ const server = app.listen(port, async () => {
7069
try {
7170
await prisma.$connect();
7271
console.log('Database connected successfully');
73-
await refreshCacheFromDB();
74-
console.log('Cache initialized from database');
7572
} catch (error) {
7673
console.error('Failed to connect to database:', error);
7774
process.exit(1);
7875
}
7976

80-
// TODO: Fetch and cache any necessary data on startup
77+
// Initial cache refresh
78+
await refreshCacheFromDB();
8179
});
8280

8381
// Graceful shutdown

0 commit comments

Comments
 (0)