CarpoolAPI is a backend API built with ASP.NET Core for a university carpooling application. The API allows students to announce themselves as either drivers or passengers, helping them connect for rides to the university.
- Install .NET 8 SDK: Download .NET 8
- Install Entity Framework Core CLI (if not already installed):
dotnet tool install --global dotnet-ef
-
Clone the repository:
git clone https://github.com/m1zukash1/CarpoolAPI.git
-
Navigate to the project directory:
cd CarpoolAPI
-
Restore dependencies:
dotnet restore
-
Create an
appsettings.Secrets.json
file in the project root with the following content, replacing with your own values:{ "ConnectionStrings": { "DefaultConnection": "Data Source=BackEndDB.db" }, "Jwt": { "Key": "this_is_a_very_secure_key_123456", "Issuer": "yourdomain.com", "Audience": "yourdomain.com" } }
-
Apply Entity Framework Core migrations to initialize the SQLite database:
dotnet ef database update
-
Run the API:
dotnet run
-
Access the API locally:
http://localhost:5069/