Skip to content

Nancyfx 2 template for web services usage

License

Notifications You must be signed in to change notification settings

Jaxelr/Nancy.Template.Webservice

Repository files navigation

Nancy.Template.Webservice Mit License

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

Builds

Appveyor
Build status

Packages

NuGet (Stable) MyGet (Prerelease)
NuGet MyGet

Purpose

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:

  1. multiple types of logs (as based on the serilog sinks).
  2. different types of caches (as based on the rapid cache lib).
  3. other types of ORMs (i. e. Dapper) by replacing the Repository class with byo.
  4. alternatively move to swagger (legacy version) from openapi replacing the nancy.metadata.openapi with nancy.metadata.swagger library from nuget.

Install

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

Uninstall

To uninstall simply execute:

dotnet new -u "Nancy.Template.Webservice"

Dependencies

This template targets dotnet core 3.1. The following libraries are included as part of the projects:

For further information on custom templates, refer to the Microsoft documentation.