env vars
This commit is contained in:
@@ -17,12 +17,20 @@ import { RaceModule } from './domain/race/RaceModule';
|
||||
import { SponsorModule } from './domain/sponsor/SponsorModule';
|
||||
import { TeamModule } from './domain/team/TeamModule';
|
||||
|
||||
import { getApiPersistence, getEnableBootstrap } from './env';
|
||||
|
||||
const API_PERSISTENCE = getApiPersistence();
|
||||
const USE_DATABASE = API_PERSISTENCE === 'postgres';
|
||||
|
||||
// Keep bootstrap on by default; tests can disable explicitly.
|
||||
const ENABLE_BOOTSTRAP = getEnableBootstrap();
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
HelloModule,
|
||||
DatabaseModule,
|
||||
...(USE_DATABASE ? [DatabaseModule] : []),
|
||||
LoggingModule,
|
||||
BootstrapModule,
|
||||
...(ENABLE_BOOTSTRAP ? [BootstrapModule] : []),
|
||||
AnalyticsModule,
|
||||
AuthModule,
|
||||
DashboardModule,
|
||||
|
||||
Reference in New Issue
Block a user