- Backend
- .NET 8
You can find in here the documentation of the APIs.
[https://clientsapi.127.0.0.1.nip.io:7214] [https://clientsapi.127.0.0.1.nip.io] [https://clientsapi.localtest.me]
- Node Js last version from https://nodejs.org/en/download/prebuilt-installer
- Make sure you have a github account https://github.com
- Git source control app from https://git-scm.com/download
- Visual Studio from https://visualstudio.microsoft.com/vs/community/
- Visual Studio Code from https://code.visualstudio.com/download
- Docker from https://www.docker.com/products/docker-desktop/
- https://github.com/jrodrigoav/coe_net_training_microservices
- git clone https://github.com/your-github-user/coe_net_training_microservices.git
- Go to the "coe_net_training_microservices" folder
- Open new command line and Run the following command :
- docker compose -f .\docker-compose.yaml --project-name microsvcs up --detach
4.1. URL
http://localhost:8080/login?next=%2F
4.2. Credentials
Search in the docker-compose.yaml file
In case your servers section is empty, follow the next steps to attatch the localhost to pgadmin.
- Right click in Servers section
- Select Register and then Server...
- In the first tap (general) put a name for the server
- In the second tap (connection), put the following information:
- Host name/address: host.docker.internal
- Username: postgres
- Password: *in the compose file*
- Open a new command line
- Go to coe_net_training_microservices\backend folder
- Open coe_net_microservices.sln solution (Visual Studio)
- Search, copy and run in the DataBase the SQL Script (ClientsApi, InventoryApi, RentingAPI, ResourcesAPI)
-Path: APIName\MigrationScripts
-File: Initial.sql
Note: Execute the file in the pgAdmin from the previous step
- On each project you need to right click
- Manage User Secrets
- Paste the following values in the json file
{
"ConnectionStrings": {
"MicroservicesDB": "User ID=xxxxx;Password=xxxxx;Host=localhost;Port=5432;Database=postgres;Pooling=true;Connection Lifetime=0;"
}
}
- Go to the appsettings.Development.json file of each project
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ResourceAPISettings": {
"Url": "http://localhost:5183/api/resources"
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
}
Right click on the project and then select following projects
-- ClientAPI
-- InventoryAPI
-- RentingAPI
-- ResourcesAPI
Now please build the project and launch it, do not forget to also launch the docker image of the db server.
You can configure Visual Studio to execute all the projects as startup:
- Right click in the solution
- Click in properties
- Select all the api projects
- Execute the endPoint : http://localhost:5183/api/resources/list (GET)
you should see no errors
- Open the command line
- Go to frontend/bookstore folder and run the following commands npm install npm run start
That should give no errors and lauch a server with the UI, which you should be able to access using this url http://localhost:4200/
- Open the command line
- Go to frontend/bookstore-react folder and run the following commands
npm install
npm run build (build project)
npm run dev (run project)
That should give no errors and lauch a server with the UI, which you should be able to access using this url http://localhost:5173/
-
Return Functionality: The return functionality is not working properly. The backend returns a successful response upon attempting to return a resource, but the resource is not actually returned.
-
Renting Unavailable Books: The backend does not return an error when a user attempts to rent unavailable resources and incorrectly lists these resources as available for rent.