node-vault
                                
                                 node-vault copied to clipboard
                                
                                    node-vault copied to clipboard
                            
                            
                            
                        How to unseal a vault that is already initialized?
Basic question. I don't see any examples on handling this scenario. Thanks
I figured out how to do this. I added an async run command to the client to handle this.
vaultClient.run = async () => {
  try {
    const status = await vaultClient.status()
    if (!status.initialized) {
      await vaultClient.init({ secret_shares: 1, secret_threshold: 1 })
    }
    if (status.sealed) {
      await vaultClient.unseal({ secret_shares: 1, key: config.vault.key })
    }
    logger.success('node-vault', 'Vault initialized and unsealed')
  } catch (err) {
    logger.error('node-vault', err.message)
  }
}
Please add this to the documentation. There are lots of missing things in the docs that leaves us lost and unsure what to do.