A Rust integration with Redis
Took the opportunity to get acclimated with Rust and looked at implementing a module library to interface with Redis. This library implemnts standard Get
, Set
and Delete
of values, with the optional time to live to be set on the value.
- Make sure you have Rust installed or use the
docker-compose.yml
pointing to theDockerfile.production
build of the container. This is arelease
build and will take some time to stand up. - Localize development may be faster, with
cargo watch
, you just need to installcargo install cargo-watch
and then runcargo watch -x run
.
- Running locally: run
cargo watch -x run
.- If you run
docker-compose up
for only theRedis
service, make sure theREDIS_CONNECTION_STRING
is set toredis://localhost:6379/
- If you run
- Running via
docker
: rundocker-compose up
with the optional-d
flag to run as a daemon.- If you run
docker-compose up
forRedis
andAPI
services, make sure theREDIS_CONNECTION_STRING
is set toredis://redis:6379/
- If you run
- Import Postman contents to test the
warp
web server framework defined endpoints.
- Modularize code, modual files were started - debugging needed.
- Fix Rust warp testing.
- Relook at the
Dockerfile.dev
anddocker-compose.yml
for the container connections to see why this isn't resolving tolocalhost:8000
, though the code is building and executing properly.