@rytass/secret-adapter-vault-nestjs
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

Rytass Utils - Secret Manager Nestjs Module (Vault)

Getting Started

This module will get vault config from env with @nestjs/common, please set following env before use.

  • VAULT_HOST (Vault service base url)
  • VAULT_ACCOUNT
  • VAULT_PASSWORD
  • VAULT_PATH (Vault secret path from root)
import { Module } from '@nestjs/common';
import { VaultService, VaultModule } from '@rytass/secret-adapter-vault-nestjs';

@Injectable()
class TestService {
  constructor(private readonly vault: VaultService) {}

  async getValue() {
    return vault.get<string>('key');
  }
}

@Module({
  imports: [VaultModule.forRoot({ path: '/', isGlobal: true })],
  providers: [TestService],
})
class TestModule {};

Package Sidebar

Install

npm i @rytass/secret-adapter-vault-nestjs

Weekly Downloads

126

Version

0.2.4

License

MIT

Unpacked Size

11.9 kB

Total Files

13

Last publish

Collaborators

  • fantasywind