feat: add session expiry deletion script and scheduler

This commit is contained in:
wancat committed 2023-08-23 12:22:15 +08:00
1 parent 8e63284211
commit 22060070b9
8 files changed
+94 -3

No files matched your search

+2
View File
@@ -10,6 +10,7 @@ import apiRouter from './api/routes/index.js'
import loadAndUpdateQuests from './utils/quest.js'
import config from './config.js'
import errorHandler from './middleware/error.js'
import expiryRemovalScheduler from './containers/expiryChecker.js'
async function main() {
const app = express()
@@ -17,6 +18,7 @@ async function main() {
socketServer(server)
await connectDB()
await loadAndUpdateQuests()
expiryRemovalScheduler()
const file = await fs.readFile('./swagger.yaml', 'utf8')
const swaggerDocument = YAML.parse(file)