INNER CODE UNIT · JavaScript
run
qpoint-io/qtap · apps/redis/node/app.js:21
async function run() {
let iteration = 0;
while (true) {
iteration++;
console.log(`[Node] Iteration ${iteration}`);
const redis = new Redis(redisOptions);
// Basic operations
const key = `node:key:${iteration}`;
await redis.set(key, `value-${iteration}`);
await redis.get(key);
// List operations
await redis.lpush('node:list', `item-${iteration}`);
await redis.lrange('node:list', 0, -1);