Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defra/cdp-dotnet-backend-template
C# ASP.NET Minimial API template with MongoDB, FluentValidation, Swagger and Serilog logging
https://github.com/defra/cdp-dotnet-backend-template
backend cdp dotnet template
Last synced: 6 days ago
JSON representation
C# ASP.NET Minimial API template with MongoDB, FluentValidation, Swagger and Serilog logging
- Host: GitHub
- URL: https://github.com/defra/cdp-dotnet-backend-template
- Owner: DEFRA
- License: other
- Created: 2023-08-24T07:08:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T11:40:21.000Z (7 days ago)
- Last Synced: 2024-11-12T12:30:56.775Z (7 days ago)
- Topics: backend, cdp, dotnet, template
- Language: C#
- Homepage:
- Size: 117 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CDP C# ASP.NET Backend Template
Core delivery C# ASP.NET backend template.
* [Install MongoDB](#install-mongodb)
* [Inspect MongoDB](#inspect-mongodb)
* [Testing](#testing)
* [Running](#running)
* [Dependabot](#dependabot)### Install MongoDB
- Install [MongoDB](https://www.mongodb.com/docs/manual/tutorial/#installation) on your local machine
- Start MongoDB:
```bash
sudo mongod --dbpath ~/mongodb-cdp
```### Inspect MongoDB
To inspect the Database and Collections locally:
```bash
mongosh
```### Testing
Run the tests with:
Tests run by running a full `WebApplication` backed by [Ephemeral MongoDB](https://github.com/asimmon/ephemeral-mongo).
Tests do not use mocking of any sort and read and write from the in-memory database.```bash
dotnet test
````### Running
Run CDP-Deployments application:
```bash
dotnet run --project Backend.Api --launch-profile Development
```### SonarCloud
Example SonarCloud configuration are available in the GitHub Action workflows.
### Dependabot
We have added an example dependabot configuration file to the repository. You can enable it by renaming
the [.github/example.dependabot.yml](.github/example.dependabot.yml) to `.github/dependabot.yml`