Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tungv/run-lua
- Owner: tungv
- Created: 2018-04-10T13:51:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T13:54:21.000Z (almost 7 years ago)
- Last Synced: 2025-01-06T03:05:37.965Z (9 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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: [],
});
```