mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
make case-sensitive
This commit is contained in:
parent
18cda44919
commit
c8bfbc6930
4 changed files with 96 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -289,4 +289,4 @@ __pycache__/
|
|||
|
||||
# FilterLists Custom Ignores
|
||||
gs/Private.gs
|
||||
api/FilterLists.API/appsettings.Development.json
|
||||
api/FilterLists.Api/appsettings.Development.json
|
||||
25
api/FilterLists.Api/FilterLists.Api.csproj
Normal file
25
api/FilterLists.Api/FilterLists.Api.csproj
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
|
||||
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="7.0.7-m61" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FilterLists.Data\FilterLists.Data.csproj" />
|
||||
<ProjectReference Include="..\FilterLists.Services\FilterLists.Services.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
21
api/FilterLists.Api/Program.cs
Normal file
21
api/FilterLists.Api/Program.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.IO;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace FilterLists.Api
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISIntegration()
|
||||
.UseStartup<Startup>()
|
||||
.UseApplicationInsights()
|
||||
.Build();
|
||||
|
||||
host.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
api/FilterLists.Api/Startup.cs
Normal file
49
api/FilterLists.Api/Startup.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using FilterLists.Data.Contexts;
|
||||
using FilterLists.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MySQL.Data.EntityFrameworkCore;
|
||||
using MySQL.Data.EntityFrameworkCore.Extensions;
|
||||
|
||||
namespace FilterLists.Api
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IHostingEnvironment env)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(env.ContentRootPath)
|
||||
.AddJsonFile("appsettings.json", false, true)
|
||||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true)
|
||||
.AddEnvironmentVariables();
|
||||
Configuration = builder.Build();
|
||||
}
|
||||
|
||||
public IConfigurationRoot Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Add framework services.
|
||||
services.AddEntityFramework()
|
||||
.AddEntityFrameworkMySQL()
|
||||
.AddDbContext<FilterListsDbContext>(options =>
|
||||
options.UseMySQL(Configuration.GetConnectionString("FilterListsConnection")));
|
||||
services.AddMvc();
|
||||
services.AddTransient<IListService, ListService>();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue