A collection of .NET REST services for a mythical online bookstore powered by Redis. It uses:
Prerequisites:
| Getting Started | See Also | Help | License | Credit |
To install this example application, run the following commands:
git clone [email protected]:redis-developer/NRedi2Read-preview.git
cd NRedi2Read-preview
You can also import the code straight into your IDE:
Set the environment secrets
dotnet user-secrets init
dotnet user-secrets set ConnectionString "localhost,abortConnect=false,ssl=false,allowAdmin=false,password="
The User API uses the BCRYPT algorithm to hash its passwords. This app will also bulk-load 1000 users when it starts up (if they are not already in the database). Because of these two pieces in conjunction starting up can take a while (a couple minutes) the first time the server is started up, unless you artificially decrease the amount of work the BCRYPT algorithm has to do. If you are only using the stuff in here for demonstration purposes you can decrease the amount of work the BCRYPT algorithm does by setting the BCryptWorkFactor
configuration variable you can do that locally with:
dotnet user-secrets set "BCryptWorkFactor" "4"
Start up Docker:
docker run -p 6379:6379 -it --rm redislabs/redismod:latest
Start the app (in separate shell)
dotnet run
You can then access the UI at http://localhost:5000/
You can either make your own user profile, or login using one of the profiles from /redi2read-data/users/users.json
Access the Swashbuckle/Swagger UI: http://localhost:5001/swagger/index.html
Quick Tutorial on Redis' Powerful Modules:
Please post any questions and comments on the Redis Discord Server, and remember to visit our Redis Developer Page for awesome tutorials, project and tips.