Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

A template for bootstrapping asp.net core web api

License

Notifications You must be signed in to change notification settings

pacjman/recipe-aspnetcore-frist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Abstract

This solution provides a quick starting point for api development. It's built using asp.net core web api. Optional modules are available. Each module is decribed below.

But frist, a quick start!

Quick Start

  1. Open your ❤️ shell. (e.g. bash, powershell, ...)
  2. Navigate to folder on your drive to receive the clone.
  3. Use git to clone from GitHub:

git clone https://github.com/cerberix-net/api-aspnetcore-frist.git

No really; it's that easy. 🏆

  1. To build, run the following commands:

cd src
dotnet restore
dotnet build

Note: The baseline api provides a ping endpoint here: /ping If all goes well, you will receive an HTTP/200 OK and PONG message.

Modules

There are optional modules available. Each module has a separate branch to keep the baseline api as minimal as possible. Here are the available modules:

Config

This module adds api configuration properties report to its /config endpoint. Here's an example response:

{
  application: "Api",
  properties: {
    assemblyName: "Api",
    version: "1.0.0.0",
    buildHash: "a05b544f74",
    buildDate: "2018-12-21 11:11 AM PST"
  },
  info: {
    config: "http://localhost:54901/Config"
  }
}

To install, run the following git command from your ❤️ shell:

git pull origin config see footnote

Docker

This module provides the setup necessary to deploy api to a Linux docker container.

To install, run the following git command from your ❤️ shell:

git pull origin docker see footnote

HealthCheck

This module provides an integration w/ cerberix:tm: health check modules, in order to verify health of dependent services which may be critical for api to function properly.

Only the core health check package is installed by default. This keeps the baseline dependencies as minimal as possible. There are a number of optional health checkers available. To find out more about available health checks & their example uses, please review this doc.

Note: There are other examples in the Startup.cs file ConfigureServices method.

To install, run the following git command:

git pull origin healthcheck see footnote

Hangfire

This module provides an integration w/ Hangfire.io in order to schedule and process jobs on a background service.

It comes with in-memory job storage option by default. see footnote

To install, run the following git command:

git pull origin hangfire see footnote

Footnotes

  1. This command will pull the module changes directly into your working branch.

2. Hangfire supports other storage providers: Sql Server & Redis to name a few. This configuration exercise is outside the scope of module.

About

A template for bootstrapping asp.net core web api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages