Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagobarradas/nancy-scaffolding
Nancy Scaffolding with log, serializer, all structure to work good for me :D
https://github.com/thiagobarradas/nancy-scaffolding
api base dotnet-core dotnet-core2 nancy nancy-scaffolding nuget scaffolding
Last synced: about 2 months ago
JSON representation
Nancy Scaffolding with log, serializer, all structure to work good for me :D
- Host: GitHub
- URL: https://github.com/thiagobarradas/nancy-scaffolding
- Owner: ThiagoBarradas
- License: mit
- Created: 2018-10-25T17:11:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-23T20:17:50.000Z (12 months ago)
- Last Synced: 2024-04-26T14:03:38.680Z (8 months ago)
- Topics: api, base, dotnet-core, dotnet-core2, nancy, nancy-scaffolding, nuget, scaffolding
- Language: C#
- Homepage: https://www.nuget.org/packages/Nancy.Scaffolding/
- Size: 398 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://barradas.visualstudio.com/Contributions/_apis/build/status/NugetPackage/Nancy%20Scaffolding?branchName=master)](https://barradas.visualstudio.com/Contributions/_build/latest?definitionId=10&branchName=master)
[![NuGet Downloads](https://img.shields.io/nuget/dt/Nancy.Scaffolding.svg)](https://www.nuget.org/packages/Nancy.Scaffolding/)
[![NuGet Version](https://img.shields.io/nuget/v/Nancy.Scaffolding.svg)](https://www.nuget.org/packages/Nancy.Scaffolding/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ThiagoBarradas_nancy-scaffolding&metric=alert_status)](https://sonarcloud.io/dashboard?id=ThiagoBarradas_nancy-scaffolding)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ThiagoBarradas_nancy-scaffolding&metric=coverage)](https://sonarcloud.io/dashboard?id=ThiagoBarradas_nancy-scaffolding)# Nancy.Scaffolding
Build web api fast and easily.
# Startup Application
Configure service in statup
```c#
// Program.csclass Program
{
static void Main(string[] args)
{
var config = new ApiBasicConfiguration
{
ApplicationContainer = RegisterApplicationContainer,
RequestContainer = RegisterRequestContainer,
Pipelines = ConfigurePipelines,
Mapper = ConfigureMapper,
ConfigureHealthcheck = ConfigureHealthcheck,
ApiName = "My App",
ApiPort = 5855,
EnvironmentVariablesPrefix = "Prefix_"
};Api.Run(config);
}public static List ConfigureHealthcheck(TinyIoCContainer container)
{
var hcs = new List();return hcs;
}public static TinyIoCContainer RegisterApplicationContainer(TinyIoCContainer container)
{
return container;
}public static TinyIoCContainer RegisterRequestContainer(NancyContext context, TinyIoCContainer container)
{
return container;
}public static IPipelines ConfigurePipelines(IPipelines pipelines, TinyIoCContainer container)
{
return pipelines;
}public static IMapperConfigurationExpression ConfigureMapper(IMapperConfigurationExpression config, TinyIoCContainer container)
{
return config;
}
}```
App Settings
```json
// appsettings.{environment}.json{
"ApiSettings": {
"AppUrl": "http://localhost:5855",
"JsonSerializer": "Snakecase",
"PathPrefix": "/myapp/v1",
"Domain": "MyDomain",
"Application": "MyApp",
"Version": "v1",
"BuildVersion": "1.0.0",
"SupportedCultures": [ "pt-BR", "es-ES", "en-US" ],
"DebugMode": true
},
"DbSettings": {
"ConnectionString": "mongodb://user:pass@localhost:27017/DatabaseName",
"Name": "DatabaseName"
},
"HealthcheckSettings": {
"Enabled": true,
"Path": "healthcheck/123456",
"LogEnabled": true
},
"LogSettings": {
"TitlePrefix": "[{Application}] ",
"JsonBlacklist": [ "*password", "*card.number", "*creditcardnumber", "*cvv" ],
"SeqOptions": {
"Enabled": true,
"MinimumLevel": "Verbose",
"Url": "http://localhost:5341",
"ApiKey": "XXXX"
},
"SplunkOptions": {
"Enabled": false,
"MinimumLevel": "Verbose",
"Url": "http://localhost:8088/services/collector",
"Token": "XXXX",
"Index": "my.index",
"Application": "MyApp",
"ProcessName": "MyApp.Domain.App",
"Company": "MyApp",
"ProductVersion": "1.0.0",
"SourceType": "_json"
},
"NewRelicOptions" : {
"Enabled" : true,
"AppName" : "MyApp",
"LicenseKey" : "xxxxx"
}
},
"DocsSettings": {
"Enabled": true,
"Title": "MyApp API Reference",
"TermsOfService": "https://myapp.com/terms-of-service",
"Description": "MyApp Main API",
"AuthorName": "Thiago Barradas",
"AuthorEmail": "[email protected]",
"BasicAuthUser": "user",
"BasicAuthPass": "pass"
}
}```
## Controller
:construction:
## Models / Validation
:construction:
## Documentation
:construction:
## Install via NuGet
```
PM> Install-Package Nancy.Scaffolding
PM> Install-Package Nancy -Version 2.0.0-clinteastwood
PM> Install-Package Nancy.Serialization.JsonNet -Version 2.0.0-clinteastwood
```## How can I contribute?
Please, refer to [CONTRIBUTING](.github/CONTRIBUTING.md)## Found something strange or need a new feature?
Open a new Issue following our issue template [ISSUE_TEMPLATE](.github/ISSUE_TEMPLATE.md)## Changelog
See in [nuget version history](https://www.nuget.org/packages/Nancy.Scaffolding)## Did you like it? Please, make a donate :)
if you liked this project, please make a contribution and help to keep this and other initiatives, send me some Satochis.
BTC Wallet: `1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX`
![1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX](https://i.imgur.com/mN7ueoE.png)