- Introduced SKIP_GPS_VALIDATION environment variable to control GPS validation during check-ins and check-outs. - Updated loadEnv function to parse SKIP_GPS_VALIDATION and enforce its rules based on NODE_ENV. - Enhanced attendance and visit services to utilize the new configuration, allowing GPS validation to be skipped in development environments. - Added unit tests to verify the behavior of SKIP_GPS_VALIDATION in various scenarios, ensuring proper handling in both production and development contexts. - Updated check-in verification logic to respect the SKIP_GPS_VALIDATION option, improving flexibility in location checks.
30 lines
909 B
Bash
30 lines
909 B
Bash
# Application default timezone for rendering and naive ISO interpretation.
|
|
# Stored values remain UTC unix milliseconds. Fixed offsets only (no IANA names).
|
|
# Examples: GMT+7, GMT+07:00, UTC+7, +07:00, +7, +0700
|
|
DEFAULT_TIMEZONE=GMT+7
|
|
|
|
PORT=3000
|
|
|
|
# PostgreSQL connection string (docker-compose default shown)
|
|
DATABASE_URL=postgresql://tracking:tracking@localhost:5432/tracking
|
|
|
|
# Required. Generate with: openssl rand -base64 48
|
|
JWT_ACCESS_SECRET=
|
|
|
|
# Access token lifetime (<number><s|m|h|d>)
|
|
JWT_ACCESS_EXPIRES_IN=15m
|
|
|
|
# Refresh token lifetime in milliseconds (default 7 days)
|
|
REFRESH_TOKEN_EXPIRES_IN_MS=604800000
|
|
|
|
# bcrypt cost factor
|
|
BCRYPT_SALT_ROUNDS=10
|
|
|
|
# OpenAPI UI at /docs (default: on unless NODE_ENV=production)
|
|
# SWAGGER_ENABLED=true
|
|
# SWAGGER_ENABLED=false
|
|
|
|
# Debug only. Skip GPS radius/location checks on check-in and check-out.
|
|
# Rejected when NODE_ENV=production.
|
|
# SKIP_GPS_VALIDATION=true
|