Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tungv/run-lua

nodejs utility to run and cache lua scripts against a redis server
https://github.com/tungv/run-lua

Last synced: 3 days ago
JSON representation

nodejs utility to run and cache lua scripts against a redis server

Awesome Lists containing this project

README

        

# run-lua

```js
const redis = require('redis');
const runLua = require('run-lua');

const redisClient = redis.createClient();
const lua = `
local counter = redis.call('INCR', KEYS[1]);
return counter;
`;

const counter = await runLua(redisClient, lua, {
keys: ['my_counter'],
argv: [],
});
```