Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Client #847

Open
omegion opened this issue Feb 3, 2025 · 4 comments
Open

Redis Client #847

omegion opened this issue Feb 3, 2025 · 4 comments
Labels

Comments

@omegion
Copy link

omegion commented Feb 3, 2025

Hi,

Is there any way to use Redis client within njs? I need to get/set entries on the Redis server. I know that there is a Lua Redis client, however, I cannot use the Lua module in my Nginx image.

@xeioex xeioex added the question label Feb 3, 2025
@xeioex
Copy link
Contributor

xeioex commented Feb 4, 2025

Hi @omegion,

We do not have native redis client or TCP API yet. We plan to do both in the future.

@omegion
Copy link
Author

omegion commented Feb 4, 2025

Thanks for your answer @xeioex! Do you know any alternative way to combine both for Nginx?

@xeioex
Copy link
Contributor

xeioex commented Feb 4, 2025

@omegion

Combine both lua and njs? There are many configuration which do that.But usually they do not interact.

One way for both lua and njs interact is to use nginx variables.
For example using js_var which create a writable nginx variable. You can write to it from lua and read from njs or vice versa. Not tested though.

@hellobbq
Copy link

really need this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants