1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

clarified some of the values in the examples

This commit is contained in:
Alberto Ricart
2019-05-31 10:48:57 -05:00
parent 48b583c57e
commit 9b464389eb
2 changed files with 22 additions and 10 deletions

View File

@@ -49,17 +49,23 @@ nc.close();
</div>
<div class="tab__content">
<pre id="connect_creds_js_content"><a class="toolbar-icons pull-right" target="_blank" href="https://github.com/nats-io/node-nats-examples/blob/master/src/auth_examples.js#L190-195"><i class="mdi mdi-github-circle" title="View on GitHub"></i></a><a class="toolbar-icons pull-right"><i class="mdi mdi-content-copy js-copy" title="Copy to Clipboard"></i></a><span class="copy-msg pull-right"></span><code class="language-javascript">let nc = NATS.connect({
<pre id="connect_creds_js_content"><a class="toolbar-icons pull-right" target="_blank" href="https://github.com/nats-io/node-nats-examples/blob/master/src/auth_examples.js#L192-200"><i class="mdi mdi-github-circle" title="View on GitHub"></i></a><a class="toolbar-icons pull-right"><i class="mdi mdi-content-copy js-copy" title="Copy to Clipboard"></i></a><span class="copy-msg pull-right"></span><code class="language-javascript">// credentials file contains the JWT and the secret signing key
let credsFile = path.join(confDir, &#39;credsfile.creds&#39;);
let nc = NATS.connect({
url: server.nats,
userCreds: testCreds
userCreds: credsFile
});
</code></pre>
</div>
<div class="tab__content">
<pre id="connect_creds_ts_content"><a class="toolbar-icons pull-right" target="_blank" href="https://github.com/nats-io/ts-nats-examples/blob/master/src/auth_examples.ts#L156-161"><i class="mdi mdi-github-circle" title="View on GitHub"></i></a><a class="toolbar-icons pull-right"><i class="mdi mdi-content-copy js-copy" title="Copy to Clipboard"></i></a><span class="copy-msg pull-right"></span><code class="language-javascript">let nc = await connect({
<pre id="connect_creds_ts_content"><a class="toolbar-icons pull-right" target="_blank" href="https://github.com/nats-io/ts-nats-examples/blob/master/src/auth_examples.ts#L160-168"><i class="mdi mdi-github-circle" title="View on GitHub"></i></a><a class="toolbar-icons pull-right"><i class="mdi mdi-content-copy js-copy" title="Copy to Clipboard"></i></a><span class="copy-msg pull-right"></span><code class="language-javascript">// credentials file contains the JWT and the secret signing key
let credsFile = path.join(confDir, &#39;credsfile.creds&#39;);
let nc = await connect({
url: server.nats,
userCreds: testCreds
userCreds: credsFile
});
</code></pre>
</div>