var redis = require('redis')
var client = redis.createClient(port, 'ip', {password: 'password'})
var bluebird = require('bluebird')
bluebird.promisifyAll(redis);
async function main2() {
console.log('main')
await client.watchAsync("foo")
const result = await client.getAsync("foo")
console.log(`get ${result}`)
const results = await client.multi().set("foo", "some heavy computation").execAsync()
console.log(`exec ${results}`)
}
main2()
No comments:
Post a Comment