0
다음 코드의 수정 설정 값을 취득하는 것은 오류를 제공합니다 : -레디 스가 : - 키
redisClient.get('aKey', function(err, aValue){
//some operations.
redisClient.set('aKey', aDashValue, function(err){
if(err){ throw err };
console.log('redisClient set sessionKey');
});
});
내가 노력하고 있어요 : - 1. 가져 오기 키의 값입니다. 2. 값 수정 3. 값 설정. 이 3 단계는 연속적으로 수행되어야합니다.
편집 :
SyntaxError: Unexpected token u
at Object.parse (native)
at /Users/apple/Documents/herokuApp/node_modules/connect-redis/lib/connect-redis.js:97:23
at try_callback (/Users/apple/Documents/herokuApp/node_modules/redis/index.js:580:9)
at RedisClient.return_reply (/Users/apple/Documents/herokuApp/node_modules/redis/index.js:670:13)
at ReplyParser.<anonymous> (/Users/apple/Documents/herokuApp/node_modules/redis/index.js:312:14)
at ReplyParse
오류는 ...? –
편집에 넣습니다. 오류의 의미를 따라갈 수 없습니다. 명령 문제의 동행이 있습니다. –
"오류 발생"처리기로 처리 할 수없는 코드로 예외가 있다고 생각합니다. 나는 "if (err) {throw err};"을 제거 할 것입니다. " 콘솔에 err을 표시하십시오. –