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) 287 B
export default async e=>{const{socket:t,payload:s}=e;try{const r=t.p3xrs.ioredis,{key:a,field:o}=s,n=await r.call("HTTL",a,"FIELDS",1,o),c=Array.isArray(n)?parseInt(n[0]):-1;t.emit(e.responseEvent,{status:"ok",ttl:c})}catch(s){t.emit(e.responseEvent,{status:"error",error:s.message})}};