cityssm/parking-ticket-system

View on GitHub
data/databasePaths.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import Debug from 'debug';
import { getConfigProperty } from '../helpers/functions.config.js';
const debug = Debug('parking-ticket-system:databasePaths');
export const useTestDatabases = getConfigProperty('application.useTestDatabases') ||
    process.env.TEST_DATABASES === 'true';
if (useTestDatabases) {
    debug('Using "-testing" databases.');
}
export const parkingDB_live = 'data/parking.db';
export const parkingDB_testing = 'data/parking-testing.db';
export const parkingDB = useTestDatabases ? parkingDB_testing : parkingDB_live;
export const nhtsaDB_live = 'data/nhtsa.db';
export const nhtsaDB_testing = 'data/nhtsa-testing.db';
export const nhtsaDB = useTestDatabases ? nhtsaDB_testing : nhtsaDB_live;