{"id":46783,"library":"wappler-redis-toolkit","title":"Wappler Redis Toolkit","description":"A Wappler Server Connect extension for interacting with Redis databases directly from the Wappler visual development environment. Current stable version is 1.0.0. The toolkit provides over a dozen server actions for common Redis operations including JSON storage, counters, key management, collections (sets and lists), and custom Redis commands. It requires the ioredis library (peer dependency) and a functioning Redis connection. Differentiating from generic Redis clients, it integrates directly into Wappler's server workflow UI with no coding required.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/tbvgl/wappler-redis-toolkit","tags":["javascript","wappler-extension","server-connect","bull-queues"],"install":[{"cmd":"npm install wappler-redis-toolkit","lang":"bash","label":"npm"},{"cmd":"yarn add wappler-redis-toolkit","lang":"bash","label":"yarn"},{"cmd":"pnpm add wappler-redis-toolkit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to establish a Redis connection and execute commands","package":"ioredis","optional":false}],"imports":[{"note":"ESM import is recommended for modern projects; the extension is designed for Wappler which uses ESM.","wrong":"const ioredis = require('ioredis')","symbol":"default","correct":"import ioredis from 'ioredis'"},{"note":"Named import for the Redis class if you need to instantiate directly.","wrong":"const Redis = require('ioredis').Redis","symbol":"Redis","correct":"import { Redis } from 'ioredis'"},{"note":"For pipeline operations, import Pipeline type/class.","wrong":"const Pipeline = require('ioredis').Pipeline","symbol":"Pipeline","correct":"import { Pipeline } from 'ioredis'"}],"quickstart":{"code":"// Ensure ioredis is installed and a Redis connection is configured in Wappler.\n// This is a server action that inserts JSON into a Redis key.\n\nimport { ServerAction } from '@wappler/server-connect';\n\nconst action: ServerAction = {\n  name: 'insertJsonToRedis',\n  handler: async (inputs: { key: string; data: any }) => {\n    const { key, data } = inputs;\n    const Redis = require('ioredis');\n    const redis = new Redis({\n      host: process.env.REDIS_HOST ?? '127.0.0.1',\n      port: parseInt(process.env.REDIS_PORT ?? '6379'),\n      password: process.env.REDIS_PASSWORD ?? undefined\n    });\n    await redis.set(key, JSON.stringify(data));\n    await redis.quit();\n    return { success: true };\n  }\n};\n\nexport default action;","lang":"typescript","description":"Demonstrates using the Redis Toolkit to connect to Redis and insert JSON data, typical of how server actions are structured in Wappler."},"warnings":[{"fix":"Run 'npm install ioredis' or ensure Wappler auto-installs it on deployment.","message":"This extension requires the ioredis library to be installed in the project. If missing, actions will fail silently or throw errors.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set environment variables in your deployment environment or Wappler server config.","message":"The environment variables (REDIS_HOST, REDIS_PORT, etc.) are optional but if not set, the extension uses defaults (127.0.0.1:6379). Ensure they are configured for production.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set REDIS_TLS to '{}' in your environment variables for TLS without a custom cert.","message":"When using TLS, set the REDIS_TLS environment variable to '{}' (empty object) or a valid TLS object. Using 'true' will cause connection failures.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the 'Run Redis Command' action with SCAN for key retrieval on production systems.","message":"The 'Get All Keys in Redis' action may block the event loop on large databases. Consider using SCAN instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure data is a valid JSON object or string; use JSON.stringify() in custom scripts if necessary.","message":"The 'Insert JSON to Redis' action does not validate that the data is valid JSON before storing; invalid data may cause runtime errors on retrieval.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.0':25 'action':33 'bull':90 'bull-queu':89 'client':68 'code':80 'collect':44 'command':51 'common':35 'connect':7,63,88 'counter':41 'current':21 'custom':49 'databas':13 'depend':58 'develop':19 'differenti':64 'direct':14,71 'dozen':31 'environ':20 'extens':8,85 'function':61 'generic':66 'includ':38 'integr':70 'interact':10 'ioredi':55 'javascript':82 'json':39 'key':42 'librari':56 'list':47 'manag':43 'oper':37 'peer':57 'provid':28 'queue':91 'redi':2,12,36,50,62,67 'requir':53,81 'server':6,32,75,87 'server-connect':86 'set':45 'stabl':22 'storag':40 'toolkit':3,27 'ui':77 'version':23 'visual':18 'wappler':1,5,17,73,84 'wappler-extens':83 'workflow':76","created_at":"2026-06-07T13:01:36.694197+00:00","updated_at":"2026-06-07T13:01:36.694197+00:00","problems":[{"fix":"Run 'npm install ioredis' in your project root or trigger deployment in Wappler to auto-install.","cause":"The ioredis library is not installed in the project.","error":"Error: Cannot find module 'ioredis'"},{"fix":"Ensure Redis is running and accessible with the configured host/port. Check firewall and environment variables.","cause":"Redis server is not running or connection parameters are incorrect.","error":"Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED"},{"fix":"Verify that ioredis is installed and the Redis constructor is called correctly (e.g., new Redis()).","cause":"The Redis connection object is not properly instantiated; likely missing ioredis import or incorrect initialization.","error":"TypeError: redis.set is not a function in Insert JSON to Redis action"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/tbvgl/wappler-redis-toolkit#readme","github":"https://github.com/tbvgl/wappler-redis-toolkit","docs":null,"changelog":null,"pypi":null,"npm":"wappler-redis-toolkit","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}