- install Node.js 18 or newer
- clone repository or download code
- run
install.sh
orinstall.bat
- run
start.sh
orstart.bat
POST your_address/get
JSON parameters:
- array of requested keys
Example:
curl -X POST \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-d '["test", "Hello World"]' \
"http://127.0.0.1/get"
Example response (assuming both "test" and "Hello World" keys exist):
{
"test": "123",
"Hello World": "Hello world!",
}
POST your_address/set
JSON parameters:
- object of keys and values
Example:
curl -X POST \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-d '{"test":"123","Hello World": "Hello world!"}' \
"http://127.0.0.1/set"
Example response
{
"test": "Set",
"Hello World": "Set"
}
DELETE your_address/del
JSON parameters:
- array of keys
Example:
curl -X POST \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-d '["test"]' \
"http://127.0.0.1/del"
Example response
{
"test": "Deleted"
}
- create
.env
file in root folder - set
keyRequired
insideconfig.json
totrue
Now every request will require Key header with valid key
Example:
curl -X POST \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-H "Key: MY_SECRET_KEY" \
-d '["test", "Hello World"]' \
"http://127.0.0.1/get"
- Other redis operations
-
- Lists
-
- Sets
-
- Hashes