The service behind OpenPLZ API. Build with .NET 8.
- PostgreSQL 14 as database
- ASP.NET 8 as web framework
- Entity Framework Core 8 as ORM layer
- Swagger UI for OpenAPI based documentation
The following instructions show you how to set up a development environment on your computer.
- Set up a local PosgreSQL 14 (or higher) instance.
- Clone or download this repository.
- Open the solution file
OpenPlzApi.sln
in Visual Studio 2022.
-
Switch to the project
OpenPlzApi.CLI
. -
Make a copy of the the
appsettings.json
file and name itappsettings.Development.json
. -
Exchange the content with the following JSON document and adjust the values to your needs. This configures the root folder for the data file downloads and the database connection.
"Sources": { "RootFolderName": "c:\\OpenPlzApi.Downloads" }, "Database": { "Server": "localhost", "Database": "OpenPlzApi", "Username": "postgres", "Password": "qwertz" }
- Build the
OpenPlzApi.CLI
project. - Run the
OpenPlzApi.CLI
project with parameterinitdb --import
. This will create and populate the PostgreSQL database.
-
Switch to the
OpenPlzApi.WebService
. -
Make a copy of the the
appsettings.json
file and name itappsettings.Development.json
. -
Exchange the content with the following JSON document and adjust the values to your needs. This configures the database connection.
"Database": { "Server": "localhost", "Database": "OpenPlzApi", "Username": "postgres", "Password": "qwertz" }
- Build the
OpenPlzApi.WebService
project. - Run the
OpenPlzApi.WebService
project and play with the Swagger UI.
Yes, that would be much appreciated. The best way to help is to post a response via the Issue Tracker and/or submit a Pull Request.