Templates

Templates

Templates allow to create new projects based on the GenHTTP SDK (such as webservices or websites) in a couple of minutes. To install the project templates in your environment run the following command in your terminal:

dotnet new -i GenHTTP.Templates

After the templates have been installed, new projects can be created using the following commands:

mkdir AppName
cd AppName
dotnet new <template-name>

The following templates are available to be used:

Template Description
genhttp-webservice A project that will host a new REST web service.
genhttp-website A website, mainly for static content (such as a business website).
genhttp-website-mvc-razor Dynamic website using the MVC pattern and Razor as a templating engine.
genhttp-website-mvc-scriban Dynamic website using the MVC pattern and Scriban as a templating engine.
genhttp-website-static Serves a static website from the file system.