A Lua client for FleetDB, based on the Ruby client.
It requires the lua-cjson
and luasocket
libraries.
require "fleet"
client = Fleet.new()
client:query{"ping"} -- "pong"
client:query{"select", "accounts", { where={"=", "id", 2} }}
-- { { id=2, owner="Alice", credits=150} }
The host and port default to "127.0.0.1"
and 3400
, but can be changed:
client = Fleet.new({ host="68.127.150.103", port=3401 })