Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WinformsAppHost.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp;
using ServiceStack;
using ServiceStack.Text;
namespace ReactChat.AppWinForms
{
static class Program
{
public static string HostUrl = "http://localhost:1337/";
public static AppHost AppHost;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Cef.Initialize(new CefSettings());
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
AppHost = new AppHost();
AppHost.Init().Start("http://*:1337/");
AppHost.ShowMain(); //Application.Run(new FormMain());
"ServiceStack SelfHost listening at {0} ".Fmt(HostUrl).Print();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment