node.js - Redis SET Command in Express.js -
probably silly question can see redis docs set key hold string value use:
set mykey "hello" but docs seem focused on commands command line.
i using express.js (with node.js) , want able run commands server.js file.
at moment have:
# db redis.createclient object set earlier in code db.set(mykey "hello"); but doesn't work - syntax error warning.
any advice?
you're missing comma in function call. redis uses spaces separate arguments, node.js uses commas. code should like:
db.set(mykey, "hello")
Comments
Post a Comment