This readme provides instructions on how to run the server and client projects of the car-management-system project.
Project structure:
-
serverdirectory (.NET Core 6.0 Web API) -
clientdirectory (Reac app) -
CarsManagement.bak(SQL Server backup file)
The server is built using .NET Core 6.0 and runs on port 7176.
- .NET Core 6.0 SDK must be installed on your machine.
- SQL Server with the CarsManagement database (Use the provided CarsManagement.bak file to restore the database).
-
Restore the SQL Server database
CarsManagement.bak. -
Navigate to the
serverdirectory. -
Open the file named
appsettings.jsonand change theConnectionStrings.DefaultConnectionaccordingly to your machine connection string; -
Open a terminal and run the following command to build and run the server:
dotnet run -
The server will start running on port 7176.
The client directory of the project is a React application that runs on port 3000.
- Node.js v18 or later must be installed on your machine.
-
Open a new terminal and navigate to the
clientdirectory. -
Install the required dependencies by running the following command:
-
Create a
.envfile at the root of the client directory and add the following line:REACT_APP_BASE_URL=https://localhost:7176/apiIf the port of the server is different from 7176 on your machine, update the URL accordingly.
-
Run the following command to start the client:
-
Open http://localhost:3000 to view it in the browser.
