UNPKG

p3x-redis-ui-server

Version:

🏍️ P3X Redis UI server — Socket.IO backend for the dual Angular + React frontend with AI queries, 54 languages, and auto data decompression

2 lines (1 loc) 360 B
import*as e from"../../shared.mjs";export default async t=>{const{socket:o,payload:s}=t;try{e.ensureReadonlyConnection({socket:o});let r=o.p3xrs.ioredis;console.info("socket.io expire",s.key,s.ttl),await r.expire(s.key,parseInt(s.ttl)),o.emit(t.responseEvent,{status:"ok"})}catch(e){console.error(e),o.emit(t.responseEvent,{status:"error",error:e.message})}};