Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: README updates #237

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"github.copilot",
"streetsidesoftware.code-spell-checker",
"redhat.vscode-yaml",
"GitHub.copilot"
"GitHub.copilot",
"yzhang.markdown-all-in-one"
]
}
}
Expand Down
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-vault

[![Build Status](https://img.shields.io/github/checks-status/kr1sp1n/node-vault/master.svg?style=flat-square)](https://github.com/nodevault/node-vault/actions?query=branch%3Amaster)
[![Build Status](https://img.shields.io/github/checks-status/nodevault/node-vault/master.svg?style=flat-square)](https://github.com/nodevault/node-vault/actions?query=branch%3Amaster)
[![Coverage Status](https://img.shields.io/codecov/c/github/nodevault/node-vault/master.svg?style=flat-square)](https://app.codecov.io/gh/nodevault/node-vault/tree/master)
[![Download Status](https://img.shields.io/npm/dm/node-vault.svg?style=flat-square)](https://www.npmjs.com/package/node-vault)
[![test](https://img.shields.io/npm/v/node-vault?style=flat-square)](https://www.npmjs.com/package/node-vault)
Expand All @@ -11,20 +11,24 @@ A client for the HTTP API of HashiCorp's [Vault] written for Node.js.


## Install
make sure to use node.js version >= 6
Prerequisites:
- NodeJS >= `16.0.0`

npm install node-vault


## Test
```bash
npm install -S node-vault
```

Run tests inside docker to do also nice integration testing:
> The year is 2023; If, for whatever reason, you need to use an older version of node.js (yet still `>= 6.x`), use `node-vault <= v0.10.0`
>
> Please note that `node-vault <= v0.10.0` contains multiple vulnerabilities ☠️

docker-compose up --force-recreate test

This will create containers for vault, postgres and running the tests inside
docker.
## Test

Run tests using docker-compose (includes vault, postgres and running the tests inside) with:
```bash
docker-compose up --force-recreate test
```

## Usage

Expand All @@ -34,7 +38,7 @@ docker.
var options = {
apiVersion: 'v1', // default
endpoint: 'http://127.0.0.1:8200', // default
token: '1234' // optional client token; can be fetched after valid initialization of the server
token: 'MY_TOKEN' // optional client token; can be fetched after valid initialization of the server
};

// get new instance of the client
Expand Down Expand Up @@ -72,7 +76,7 @@ Instead of installing all the dependencies like vault itself, postgres and other
use [docker] and [docker-compose] to link and run multiple docker containers with all of its dependencies.

```bash
git clone [email protected]:kr1sp1n/node-vault.git
git clone [email protected]:nodevault/node-vault.git
cd node-vault
docker-compose up vault
```
Expand Down Expand Up @@ -116,11 +120,11 @@ const vault = require('node-vault')(options);

[![Backers](https://opencollective.com/node-vault/tiers/backers.svg?avatarHeight=80&width=600)](https://opencollective.com/node-vault/contribute)

[examples]: https://github.com/kr1sp1n/node-vault/tree/master/example
[docker-compose.yml]: https://github.com/kr1sp1n/node-vault/tree/master/docker-compose.yml
[examples]: https://github.com/nodevault/node-vault/tree/master/example
[docker-compose.yml]: https://github.com/nodevault/node-vault/tree/master/docker-compose.yml
[Vault]: https://vaultproject.io/
[docker-compose]: https://www.docker.com/docker-compose
[docker]: http://docs.docker.com/
[docker toolbox]: https://www.docker.com/toolbox
[docco]: http://jashkenas.github.io/docco
[feature list]: https://github.com/kr1sp1n/node-vault/tree/master/features.md
[feature list]: https://github.com/nodevault/node-vault/tree/master/features.md
Loading