Dotnet template library used to create web services using the Nancy web Framework.
Note: Since Nancyfx is no longer being maintained i will be deprioritizing this library, please check here for details
Appveyor |
---|
NuGet (Stable) | MyGet (Prerelease) |
---|---|
A quick scaffolder for web services build using Nancyfx as the web framework. It provides the basic tools for validations, endpoint creation and database usage. As is the case with Nancy, it is relatively customizable.
It can be altered to use:
- multiple types of logs (as based on the serilog sinks).
- different types of caches (as based on the rapid cache lib).
- other types of ORMs (i. e. Dapper) by replacing the Repository class with byo.
- alternatively move to swagger (legacy version) from openapi replacing the nancy.metadata.openapi with nancy.metadata.swagger library from nuget.
For installation via the dotnet install command:
dotnet new -i "Nancy.Template.Webservice::*"
For myget installations you can specify the source on the dotnet command:
dotnet new -i "Nancy.Template.Webservice::*" --nuget-source https://www.myget.org/F/nancy-template-webservice/api/v3/index.json
Then you can freely use it by executing the following dotnet command:
dotnet new nancyws -o MySampleWs
To uninstall simply execute:
dotnet new -u "Nancy.Template.Webservice"
This template targets dotnet core 3.1. The following libraries are included as part of the projects:
- Nancy
- Nancy.Metadata.OpenApi
- Nancy.RapidCache
- Nancy.Serilog
- Serilog
- Microsoft.Extensions.Diagnostics.HealthChecks
- Insight.Database
- Xunit
- NSubstitute
- Altcover
- ReportGenerator
For further information on custom templates, refer to the Microsoft documentation.