drogon/examples/redis
Sebastián González a02d8e402c
Add Redis example (#918)
2021-07-06 23:02:11 +08:00
..
controllers Add Redis example (#918) 2021-07-06 23:02:11 +08:00
CMakeLists.txt Add Redis example (#918) 2021-07-06 23:02:11 +08:00
README.md Add Redis example (#918) 2021-07-06 23:02:11 +08:00
main.cc Add Redis example (#918) 2021-07-06 23:02:11 +08:00

README.md

Redis example

A simple redis example

Usage

First of all you need redis running on the port 6379

Post

curl --location --request POST 'localhost:8080/client/foo' \
--header 'Content-Type: application/json' \
--data-raw '{
  "value": "bar"
}'

Get

curl --location --request GET 'localhost:8080/client/foo'