templating api

This commit is contained in:
2026-06-19 22:20:43 -07:00
parent 08d7a80f56
commit 84f894c356
110 changed files with 12432 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import dbMigrationClient from "@/db/db-migration-client"
import { logger } from "@/utils/logger"
export async function isValidConnection() {
try {
await dbMigrationClient.raw("SELECT GETDATE()")
logger.info("Connection has been established successfully.")
return true
} catch (error) {
logger.error("Unable to connect to the database: " + error)
return false
}
}
if (require.main === module) {
isValidConnection()
}