Created
August 27, 2015 01:37
-
-
Save mythz/b45729ef6bd641b73229 to your computer and use it in GitHub Desktop.
WinformsAppHost.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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