Skip to content

danielfcollier/dotnet-api-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API App

Requirements: .NET SDK 6.0

Table of Contents

Demo Version

Run locally with ngrok:

make tunnel

Build and Run the App

Locally:

make build
make run

Development:

make run

Deploy:

make deploy

With Docker:

docker build -t api-rest .
docker run -p 4000:4000 api-rest

Run Tests

make test

CI-CD

GitHub Actions

Tests are configured to run on multiple OS and .NET SDK versions to make sure the app is compatible across many platforms.

Test locally with act

act -j tests

Deployment to Production Branch

If tests are passing, the CI with GitHub Actions pushes the changes to a production branch (prod).

References

Base template created with:

dotnet new webapi -o API.Rest

https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-6.0&tabs=visual-studio

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0

https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test

Ngrok

https://ngrok.com

Base dockerfile created with:

https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=linux

thingsboard/thingsboard-gateway#897

Test GitHub Actions Locally

https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

https://github.com/nektos/act

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published