|
This is a very basic API (with database) template only with one health check endpoint. This solution can be run directly or used to install the template. In order to make this repo more maintainable, no complex template syntaxes are used. All template related configurations are in the .template.config folder.
There are two main objectives of this initiative:
- Quick creation and deployment of API
- Keep the repo easy to understand (without complex templating code) so that it's maintainable
- Pull this repo
- Run the following command:
dotnet new install .
- Run one of the following commands:
dotnet new my-basic-api// from within the desired destinition folderdotnet new my-basic-api -o <SOLUTION_NAME>
- Run the following command:
dotnet new list
- This can be done in different ways. Here are some examples:
dotnet new list --tag inspiratodotnet new list --author LiteObjectsdotnet new list liteObjectdotnet new list <SEARCH_KEY_WORD>
- Run one of the following commands:
dotnet new uninstall <PATH_TO_TEMPLATE_CONFIG_FOLDER>// if you need to explicitly specify the path of the ".template.config" folderdotnet new uninstall .// if you are at the solution file level
{
"$schema": "http://json.schemastore.org/template",
"author": "LiteObjects Devs",
// Used as search keyword -> $dotnet new list insp
"classifications": [
"liteObject", "webapi", "basic", "simple"
],
// A unique name for this template.
"identity": "BasicTemplate.Api",
"name": "My Basic API Template",
// shortName will be used with dotnet new command to create
"shortName": "my-basic-api",
// sourceName will be replaced everywhere in the solution
"sourceName": "BasicTemplate.Api",
"preferNameDirectory": true,
"tags": {
"language": "C#",
"type": "solution"
}
}