# core/loaders/environment.loader.ts

> 13 lines of code and 1 definition.

Tree: Bane's Lab Deploy
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/deploy#file-deploy-core-loaders-environment-loader-ts
Source text: https://banes-lab.com/source/deploy/core/loaders/environment.loader.ts.txt

Listed in [core/loaders](https://banes-lab.com/api/source/deploy/core/loaders.md).

## Definitions

- `loadSecrets` (lexical_declaration, line 4, exported)

## Contained in

- [core/loaders](https://banes-lab.com/anatomy/deploy/folder-deploy-core-loaders.md)

## Uses

- [core/converters/catalog.converter.ts](https://banes-lab.com/source/deploy/core/converters/catalog.converter.ts.md)

## Linked from

- [core/converters](https://banes-lab.com/anatomy/deploy/folder-deploy-core-converters.md)

## Source

```typescript
import { optionalTextOf, textOf } from "@ssot/secrets";
import type { Secrets } from "#types/deployment.types";

export const loadSecrets = function loadSecrets(): Secrets {
    return {
        deployWebhook: textOf("DEPLOY_DISCORD_WEBHOOK_URL"),
        host: textOf("DEPLOY_HOST"),
        keyFile: textOf("DEPLOY_KEY_FILE"),
        nginxWebhook: textOf("NGINX_DISCORD_WEBHOOK_URL"),
        passphrase: optionalTextOf("SSH_PASSPHRASE"),
        searchKey: textOf("INDEXNOW_KEY"),
        user: textOf("DEPLOY_USER"),
    };
};
```
