diff --git a/templates/zerver/api/register-queue.md b/templates/zerver/api/register-queue.md index 182b1e1bc1..6ea4eb3195 100644 --- a/templates/zerver/api/register-queue.md +++ b/templates/zerver/api/register-queue.md @@ -60,21 +60,17 @@ More examples and documentation can be found [here](https://github.com/zulip/zul ```js const zulip = require('zulip-js'); +// Download zuliprc-dev from your dev server const config = { - username: 'othello-bot@example.com', - apiKey: 'a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5', - realm: '{{ api_url }}' + zuliprc: 'zuliprc-dev', }; -const client = zulip(config); - -// Register a queue -const params = { - event_types: ['message'] -}; - -client.queues.register(params).then(res => { - console.log(res); +zulip(config).then((client) => { + // Register a queue + const params = { + event_types: ['message'] + }; + client.queues.register(params).then(console.log); }); ```