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:
@@ -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, 'credsfile.creds');
|
||||
|
||||
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, 'credsfile.creds');
|
||||
|
||||
let nc = await connect({
|
||||
url: server.nats,
|
||||
userCreds: testCreds
|
||||
userCreds: credsFile
|
||||
});
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user