mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix: change connect db error handling
This commit is contained in:
1 parent
d3dd12a547
commit
cc9040038d
2 files changed
+7
-3
No files matched your search
+6
-1
@@ -17,7 +17,12 @@ import expiryRemovalScheduler from './containers/expiryChecker.js'
|
||||
import { createTestUser } from './utils/auth.js'
|
||||
|
||||
async function main() {
|
||||
await connectDB(config.db)
|
||||
try {
|
||||
await connectDB(config.db)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
await createTestUser()
|
||||
|
||||
|
||||
Reference in new issue
Block a user