test server NUXT_ env
This commit is contained in:
@@ -6,8 +6,7 @@ let _db: ReturnType<typeof drizzle> | null = null
|
||||
export function useDB() {
|
||||
if (_db) return _db
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
let dbPath = config.pathDb || process.env.PATH_DB
|
||||
let dbPath = process.env.NUXT_PATH_DB
|
||||
|
||||
if (!dbPath) {
|
||||
throw new Error('PATH_DB is not configured')
|
||||
|
||||
Reference in New Issue
Block a user