- Notifications
You must be signed in to change notification settings - Fork581
Node.js example (node redis)
Josh Baker edited this pageFeb 21, 2017 ·1 revision
npm install redis
All Tile38 commands should be sent using theclient.send_command(name, args, callback)
function.
varredis=require("redis")varclient=redis.createClient(9851,"localhost")client.send_command("SET",["fleet","truck1","POINT","33","-115"],function(err,reply){if(err){// ERROR}else{console.log(reply)// OK}})client.send_command("GET",["fleet","truck1"],function(err,reply){if(err){// ERROR}else{console.log(reply)// {"type":"Point","coordinates":[-115,33]}}})