mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor: cli
This commit is contained in:
1 parent
4ab3096fa5
commit
7c1d83ccd3
3 files changed
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import connectDB from '@linux-odyssey/models'
|
||||
import { removeExpired } from '../containers/expiryChecker.js'
|
||||
import config from '../config.js'
|
||||
import logger from '../utils/logger.js'
|
||||
|
||||
connectDB(config.db)
|
||||
.then(removeExpired)
|
||||
.then(() => {
|
||||
process.exit(0)
|
||||
})
|
||||
.catch((err) => {
|
||||
logger.error(err)
|
||||
process.exit(1)
|
||||
})
|
||||
Reference in new issue
Block a user