当前位置:网站首页>node uses redis
node uses redis
2022-08-05 00:20:00 【Xu Tongbao】
redis download:
https://github.com/tporadowski/redis/releases
Using from the command line:
Access redis through node:
const redis = require('redis')const redisClient = redis.createClient()redisClient.on('error', (err) => console.log('Redis redisClient Error', err))redisClient.connect()module.exports = {redisClient}
Pass the interface test:
//redisconst toolsRedis = async(req, res) => {const a = await redisClient.get('a')res.send({code: 200,data: {a},message: 'redis successful'})}
Query all keys:
keys *
Clear all keys:
flushall
边栏推荐
- IDEA 文件编码修改
- tensor.nozero(), mask, [mask]
- MVCC是什么
- 2022牛客多校第三场 A Ancestor
- 【LeetCode】矩阵模拟相关题目汇总
- what?测试/开发程序员要被淘汰了?年龄40被砍到了32?一瞬间,有点缓不过神来......
- gorm联表查询-实战
- KT148A voice chip ic working principle and internal architecture description of the chip
- [idea] idea configures sql formatting
- #yyds dry goods inventory #Switching equipment serious packet loss troubleshooting
猜你喜欢
随机推荐
数据类型-整型(C语言)
性能测试如何准备测试数据
国内网站用香港服务器会被封吗?
电子行业MES管理系统的主要功能与用途
英特尔WiFi 7产品将于2024年亮相 最高速度可达5.8Gbps
网站最终产品页使用单一入口还是多入口?
LeetCode Hot 100
Metasploit-域名上线隐藏IP
仿网易云音乐小程序-uniapp
Cython
矩阵数学原理
软件质量评估的通用模型
Three tips for you to successfully get started with 3D modeling
2022牛客暑期多校训练营5(BCDFGHK)
Chinese and Japanese color style
2022多校第二场 K题 Link with Bracket Sequence I
【LeetCode】双指针题解汇总
00、数组及字符串常用的 API(详细剖析)
tiup update
MongoDB permission verification is turned on and mongoose database configuration