1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

DOC-3914: re-issue TCE PRs previously issued by justincastilla (#2781)

This commit is contained in:
David Dougherty
2024-07-03 12:29:04 -07:00
committed by GitHub
parent 70f3606a3d
commit e7347f8a51
8 changed files with 1154 additions and 146 deletions

View File

@@ -1,26 +0,0 @@
// EXAMPLE: set_and_get
// REMOVE_START
import assert from "assert";
// REMOVE_END
// HIDE_START
import { createClient } from 'redis';
const client = createClient();
client.on('error', err => console.log('Redis Client Error', err));
await client.connect();
// HIDE_END
await client.set('bike:1', 'Process 134');
const value = await client.get('bike:1');
console.log(value);
// returns 'Process 134'
//REMOVE_START
assert.equal(value, 'Process 134');
//REMOVE_END
// HIDE_START
await client.quit();
// HIDE_END