Skip to content

Instantly share code, notes, and snippets.

@mythz
Created August 27, 2015 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mythz/b45729ef6bd641b73229 to your computer and use it in GitHub Desktop.
Save mythz/b45729ef6bd641b73229 to your computer and use it in GitHub Desktop.
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