Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoPires committed Dec 19, 2017
1 parent 183e3e6 commit c202b83
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/Equinox.UI.Site/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.IO;
using Equinox.Infra.CrossCutting.Identity.Data;
using Equinox.Infra.CrossCutting.Identity.Data;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
Expand All @@ -19,23 +18,12 @@ namespace Equinox.UI.Site
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
public IConfiguration Configuration { get; }

if (env.IsDevelopment())
{
builder.AddUserSecrets<Startup>();
}

builder.AddEnvironmentVariables();
Configuration = builder.Build();
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfigurationRoot Configuration { get; }

public void ConfigureServices(IServiceCollection services)
{
Expand All @@ -60,7 +48,7 @@ public void ConfigureServices(IServiceCollection services)
{
googleOptions.ClientId = Configuration["Authentication:Google:ClientId"];
googleOptions.ClientSecret = Configuration["Authentication:Google:ClientSecret"];
}); ;
});

services.AddMvc();
services.AddAutoMapper();
Expand Down Expand Up @@ -90,7 +78,6 @@ public void Configure(IApplicationBuilder app,
{
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
//app.UseBrowserLink();
}
else
{
Expand Down

0 comments on commit c202b83

Please sign in to comment.