<commit_before>﻿using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Serialization;

namespace HelloWorldApp
{
    public class Startup
    {
        public Startup(IHostingEnvironment env)
        {
        }
        
        // 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.AddMvcCore()
                .AddJsonFormatters(options => 
                    options.ContractResolver = new CamelCasePropertyNamesContractResolver());
        }
        
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        // Configure is called after ConfigureServices is called.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            // Configure logging
            loggerFactory.AddConsole(LogLevel.Debug);
            
            // Serve the default file, if present.
            app.UseDefaultFiles();
            // Add static files to the request pipeline.
            app.UseStaticFiles();
            
            // Add MVC to the request pipeline.
            app.UseMvc();
        }
        
        // Entry point for the application.
        public static void Main(string[] args)
        {
            var currentDir = Directory.GetCurrentDirectory();
            var webRoot = currentDir + Path.DirectorySeparatorChar + 
                            "HelloCoreClrApp.Ui" + Path.DirectorySeparatorChar + 
                            "wwwroot";

            if (!Directory.Exists(webRoot))
                webRoot = currentDir + Path.DirectorySeparatorChar + 
                            ".." + Path.DirectorySeparatorChar +
                            "HelloCoreClrApp.Ui" + Path.DirectorySeparatorChar + 
                            "wwwroot";
            
            var host = new WebHostBuilder()
                .UseKestrel()
                .UseWebRoot(webRoot)
                .UseStartup<Startup>()
                .Build();

           host.Run();
        }
    }
}
<commit_msg>Add another wwroot place to look for.<commit_after>﻿using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Serialization;

namespace HelloWorldApp
{
    public class Startup
    {
        public Startup(IHostingEnvironment env)
        {
        }
        
        // 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.AddMvcCore()
                .AddJsonFormatters(options => 
                    options.ContractResolver = new CamelCasePropertyNamesContractResolver());
        }
        
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        // Configure is called after ConfigureServices is called.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            // Configure logging
            loggerFactory.AddConsole(LogLevel.Debug);
            
            // Serve the default file, if present.
            app.UseDefaultFiles();
            // Add static files to the request pipeline.
            app.UseStaticFiles();
            
            // Add MVC to the request pipeline.
            app.UseMvc();
        }
        
        // Entry point for the application.
        public static void Main(string[] args)
        {
            var currentDir = Directory.GetCurrentDirectory();
            
            var webRoot = currentDir + Path.DirectorySeparatorChar + 
                            ".." + Path.DirectorySeparatorChar + 
                            "wwwroot";
                            
            if (!Directory.Exists(webRoot))
                webRoot = currentDir + Path.DirectorySeparatorChar + 
                            "HelloCoreClrApp.Ui" + Path.DirectorySeparatorChar + 
                            "wwwroot";

            if (!Directory.Exists(webRoot))
                webRoot = currentDir + Path.DirectorySeparatorChar + 
                            ".." + Path.DirectorySeparatorChar +
                            "HelloCoreClrApp.Ui" + Path.DirectorySeparatorChar + 
                            "wwwroot";
            
            var host = new WebHostBuilder()
                .UseKestrel()
                .UseWebRoot(webRoot)
                .UseStartup<Startup>()
                .Build();

           host.Run();
        }
    }
}

{'fraction_non_alphanumeric': 0.07253365481213582, 'fraction_numerical': 0.0, 'mean_word_length': 1.5686274509803921, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '89089', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1131, 'n_words': 297}