diff options
Diffstat (limited to 'packages/backend/src/core/EnvService.ts')
| -rw-r--r-- | packages/backend/src/core/EnvService.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/backend/src/core/EnvService.ts b/packages/backend/src/core/EnvService.ts new file mode 100644 index 0000000000..8cc3b95735 --- /dev/null +++ b/packages/backend/src/core/EnvService.ts @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Injectable } from '@nestjs/common'; + +/** + * Provides access to the process environment variables. + * This exists for testing purposes, so that a test can mock the environment without corrupting state for other tests. + */ +@Injectable() +export class EnvService { + /** + * Passthrough to process.env + */ + public get env() { + return process.env; + } +} |