mirror of
https://gitlab.com/mobicoop/v3/service/configuration.git
synced 2026-01-12 00:02:39 +00:00
extract config files
This commit is contained in:
19
src/config/carpool.config.ts
Normal file
19
src/config/carpool.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('carpool', () => ({
|
||||
departureTimeMargin: process.env.DEPARTURE_TIME_MARGIN
|
||||
? parseInt(process.env.DEPARTURE_TIME_MARGIN, 10)
|
||||
: 900,
|
||||
role: process.env.ROLE ?? 'passenger',
|
||||
seatsProposed: process.env.SEATS_PROPOSED
|
||||
? parseInt(process.env.SEATS_PROPOSED, 10)
|
||||
: 3,
|
||||
seatsRequested: process.env.SEATS_REQUESTED
|
||||
? parseInt(process.env.SEATS_REQUESTED, 10)
|
||||
: 1,
|
||||
strictFrequency: process.env.STRICT_FREQUENCY
|
||||
? process.env.STRICT_FREQUENCY === 'false'
|
||||
? false
|
||||
: true
|
||||
: false,
|
||||
}));
|
||||
Reference in New Issue
Block a user