Skip to content

Danny-UKDM/dotnetcore-webapi

Repository files navigation

.Net Core Web Api

Build status

Just playing with a .Net Core 2.2 Web Api

Getting Started

These instructions will get you a copy of the solution up and running on your local machine for development and testing purposes.

Prerequisites

Using The Solution

In a terminal window in the root of the solution;

  • Restore dependencies by using the dotnet restore command.

  • Build the solution by using the dotnet build command.

  • To run all tests, including integration tests;

    1. Provision the LocalStack and PostgreSQL resources by using the docker-compose up -d command.
    2. Run all tests by using the dotnet test command.
  • To run the Web API project locally;

    1. Provision the LocalStack and PostgreSQL resources by using the docker-compose up -d command.
    2. Run the application by using the dotnet run --project WebApi/WebApi.csproj command.

Running the Web API project locally will create a local test S3 Bucket, PostgreSQL database and table; before making the HTTP endpoints available.

On application close (ctrl + c from the terminal window), the test database will be dropped and the S3 bucket, destroyed.

Swagger

This project uses Swagger to document the API - see https://localhost:{port}/swagger/ when running the project.

Built With

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Huge hat tip to Matt and Tim for making my life super easy with Badger.Data, and for providing clean open-sourced code which inspired me to write some of my own.

About

Fun with .Net Core Web API and Badger.Data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages