4 ms·
Can this be used instead of Lua with Redis? Is there an example somewhere of that?
by OriginalPenguin 9y ago
Can this be used instead of Lua with Redis? Is there an example somewhere of that?
- bobwaycott 9y agoCheck out https://github.com/jondeandres/moon-redis https://github.com/jondeandres/moon-redis
- bpicolo 9y agoPretty sure he means redis scripting https://redis.io/commands/eval https://redis.io/commands/eval
- OriginalPenguin 9y agoYes, that's what I meant. Thanks!
- leafo 9y agoYup, just pre-compile the code and load it into redis as normal.
- stdbrouw 9y agoHere's an example of a job runner (≈ cron) in Redis and MoonScript: https://github.com/debrouwere/jobs/tree/master/src https://github.com/debrouwere/jobs/tree/master/src. I don't maintain it anymore, but it should give you an idea of how MoonScript can make Redis scripting a whole lot less tedious.