Navigate to:
Live Bookstore Api On Azure
Or copy paste this Url sh https://bookstore-api.azurewebsites.net/swagger/index.html
.
Either of the above will navigate you to the swagger documentation page of the Bookstore API.
The app uses JWT token for authentication. Some actions might require you to be Authenticated. Use
superadmin@bookstore.com
as the username and Pa$$w0rd
as password to login through the login endpoint to get the Token. Click on authorize button and paste the token then you can test the actions.
This can also be tested using Postman.
-
Clone the repo
git clone https://github.com/MuthomiEric/Bookstore
-
Make sure you have followed the above steps to install .NET 5 and visual studio on your machine
-
Navigate to the .sln file and click on it it will open the solution on visual studio
-
Restore the dependancies
-
Add a connection string to your database in appsetting.json one for Identity and another one for StoreContext. Copy this connection string and edit accordingly
"ConnectionStrings": {
"AppIdentityCS": "Server=(local);Initial Catalog=AppIdentity;Persist Security Info=False;User ID=sa;Password={yourpassword};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;",
"BookstoreCS": "Server=Server=(local);Initial Catalog=BookStore;Persist Security Info=False;User ID=sa;Password={yourpassword};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
- Also add a token section like this to your appsetting.json
"Token": {
"Key": "el gran secreto",
"Issuer": "https://localhost:5001"
}
- Start the application. Navigate to your URL/swagger and you will have the UI documenting the API
The app uses JWT token for authentication. Some actions might require you to be Authenticated. Use superadmin@bookstore.com as the username and Pa$$w0rd to login through the login endpoint to get the Token. Click on authorize button and paste the token then you can test the actions.