Microservice that checks whether a username is available for use or not using redis-bloom in-memory database.
- Golang 1.16.5
- Docker
- make
- Clone the repo
- Run
make test
so that redis-bloom image is pulled and a local dev image is built. This will also run test-cases for redis-bloom DB client. - Run
make seed
which will result in generation of 10,000 usernames & will be inserted into redis-bloomfilter namelyusername
. - Run
make build
to generate application binary. Binary will be placed inprojectFolder/bin/suave
. - Run this command to execute binary.
./bin/suave
- A
seed.txt
file will be created as a result of Step 3 in your project folder holding usernames generated. Pick one and you can test it via
curl --location --request GET 'http://localhost:8080/v1/username/availability?username=johndoe123'
- To check health of services running, use this command:
curl --location --request GET 'http://localhost:8080/v1/health'