inmemory to postgres
This commit is contained in:
@@ -36,6 +36,11 @@ export function getApiPersistence(): ApiPersistence {
|
||||
return requireOneOf('GRIDPILOT_API_PERSISTENCE', configured, ['postgres', 'inmemory'] as const);
|
||||
}
|
||||
|
||||
// Tests should default to in-memory even when DATABASE_URL exists, unless explicitly overridden.
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
return 'inmemory';
|
||||
}
|
||||
|
||||
return process.env.DATABASE_URL ? 'postgres' : 'inmemory';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user