{
………………
"vpnkitCIDR": "192.168.65.0/24",
"socksProxyPort": 0,
"proxyHttpMode": "system",
"overrideProxyHttp": "",
"overrideProxyHttps": "",
"overrideProxyExclude": "",
"filesharingDirectories": [],
"useVpnkit": true,
"vpnKitMaxPortIdleTime": 300,
"vpnKitTransparentProxy": false, <=***Config this for fix that error***
"useWindowsContainers": false,
"noWindowsContainers": false,
"requireVmnetd": false,
}

--

--

บทความนี้จะมาแนะนำการ public angular application ด้วย github-pages
อย่างง่ายๆ สามารถนำไปปรับใช้ได้กับ หลายๆ framwork ด้วยครับ

  1. สร้าง angualr web application
ng new sampleweb

2. Create Github Repository

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/pichayean/sampleweb.git
git push -u origin main

--

--

Simple way to access IHostEnvironment in ConfigureServices.
You can declare HostEnvironment in global scope. it work for me!

public class Startup
{
public Startup(IConfiguration configuration
, IHostingEnvironment environment)
{
Configuration = configuration;
HostingEnvironment = environment;
}

public IConfiguration Configuration { get; }
public IHostingEnvironment HostingEnvironment { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
if(HostingEnvironment.IsDevelopment()){
Console.WriteLine("IsDevelopment")
}
}
public void Configure(IApplicationBuilder app)
{
if (HostingEnvironment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints => {
endpoints.MapControllers();
});
}
}

Done 😎😎

--

--

Macus.y

“Many of life’s failures are people who did not realize how close they were to success when they gave up.”– Thomas A. Edison 😇😇😇