using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
public class Program
{
static void Main() => WebHost.Start(ctx => ctx.Response.WriteAsync("Hello World!")).WaitForShutdown();
}
Last active
February 1, 2023 19:14
-
-
Save IEvangelist/5c5706221fed67fe1fb87f98b49b4ff6 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@IEvangelist , would you mind throwing up and linking to a Gist of, say, the smallest possible
launchSettings.jsonto go with this? Thus far, I've got this as aProgram.csand<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net6.0</TargetFramework><Nullable>enable</Nullable><LangVersion>preview</LangVersion><ImplicitUsings>true</ImplicitUsings><RootNamespace>MinimalAPI</RootNamespace></PropertyGroup></Project>as aMinimalAPI.csprojbut I'm stuck figuring out what to put forlaunchSettings.json, which is my best guess why, when I publish this 2-file repo to platform.sh, it gives me a "live" URL hosted on their servers, but visiting the URL 502's out.(I know, I know, I'm supposed to be using the "dotnet" CLI to scaffold things out for me. I'm petulant and refuse to use boilerplate I don't understand and insist on doing this the hard way, adding teeny-tiny files by hand until it runs.)
Thanks!