A non-featureful utility for loading redis lua scripts.
JavaScript Lua
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json
test.js
test.lua

README.md

loadscript

A non-featureful utility to loading lua scripts.

Example

var fs = require('fs');
var redis = require('redis');
var assert = require('assert');
var loadscript = require('loadscript');

var rc = redis.createClient();
var lua = fs.readFileSync('./test.lua');
var script = loadscript(rc, lua);

script([], [], function (err, output) {
  assert(output == 'hello world!');
  rc.quit(function () {
    process.exit(0);
  });
});

License

MIT