예제 #1
0
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", true, true)
                          .AddEnvironmentVariables();

            if (env.IsDevelopment())
            {
                builder.AddUserSecrets("HashTagSecrets");
            }

            Configuration = builder.Build();
            NLogHelper.ConfigureNLog(Configuration["db:default"], "nlog.config");
        }
예제 #2
0
 public static void Main(string[] args)
 {
     Paths.EnsureDirsCreated();
     NLogHelper.ConfigureNLog();
     CreateHostBuilder(args).Build().Run();
 }