zkteco-home / redis-windows

Native port of Redis for Windows,it can be installed as service.
MIT License
1.84k stars 167 forks source link

i need redis-http-api #66

Closed jmonereal closed 7 months ago

jmonereal commented 8 months ago

https://github.com/dengkane/redisHttpApi https://github.com/arunesh90/http-redis maybe these two are what I need,but it just work in Linux,if it can work in windows,that's will be better.Maybe there are more projects in github,I hope your project can add this module.

zkteco-home commented 8 months ago

I really didnt get you,what can i do for you?how can you know it can not run in windows?tell me how to reproduce your issue,what 's issue?

jmonereal commented 7 months ago

Installing and configuring Redis HTTP API

To use the Redis HTTP interface, you first need to install the Redis server and Redis HTTP API. On Ubuntu, you can install it using the following command:

$sudo apt-get update

$sudo apt-get install redis server redis command

one

two

After installation, you need to edit the Redis configuration file Redis.conf and enable the HTTP interface. You can find the following content and uncomment it:

HTTP enabled yes

HTTP port 8081

one

two

Then restart the Redis server:

$sudo service redis server restart

one

Using Redis HTTP API

Using the HTTP interface of Redis is very simple. You only need to use various methods of HTTP to send requests and perform corresponding operations based on the path and parameters of the request.

Here are some common examples of Redis operations:

Set key value pairs

To set a key value pair, you can use the HTTP PUT method and specify the key and value:

PUT/API/set? Key=mykey&value=myvalue

one

Get key value pairs

To obtain the value of a key, you can use the HTTP GET method and specify the key:

GET/API/get? Key=mykey

one

Delete key value pairs

To delete a key value pair, you can use the HTTP Delete method and specify the key:

Delete/app/delete? Key=mykey

one

Get all key value pairs

To obtain all key value pairs, you can use the HTTP GET method without specifying the key:

Copy

GET/API/getAll

one

The above are just some simple examples. In fact, Redis's HTTP interface supports more operations and parameters. You can refer to the documentation of the Redis HTTP API to learn more details.


i had read this article,and I know that if I want enable the redis http api ,I need install the 'redis server redis command' in Linux system,but in windows system I can't install this server,so I can't enable the redis http api in windows.I ask you if you can do something than I can enable the redis http api when I installed the redis-windows and start it.

jmonereal commented 7 months ago

maybe we have other way is we can visit redis via nodejs express module after we make a server for redis have a http api,but I think if we can directly visit redis-http-api ,that's very easy and direct.

zkteco-home commented 7 months ago

In redis source code config.c file,i didnt find HTTP enable HTTP port params,I guess you need 3rd library,like redis-proxy or redis client.

jmonereal commented 7 months ago

ok thanks for your reply