12345678910111213141516171819202122 |
- const redis = require('redis');
- const client = redis.createClient();
- console.log('OK');
- client.connect('127.0.0.1', 6379);
- client.on('connect', function(){
- console.log('Connected.');
- });
-
- async function demo(){
- await client.json.set('car','.',{node: 4433});
- const val = await client.json.get('car',{path: '.node',});
- console.log(`Value is: ${val}`);
- await client.quit();
- }
- demo();
-
|