static void Main(string[] args) { var http = new NetworkSocket.Http.HttpServer(); http.GlobalFilter.Add(new Filters.ExceptionFilterAttribute()); http.RegisterControllers(typeof(Program).Assembly); http.StartListen(7777); Console.ReadLine(); }
static void Main(string[] args) { var http = new NetworkSocket.Http.HttpServer(); http.GlobalFilter.Add(new Filters.ExceptionFilterAttribute()); http.RegisterControllers(typeof(Program).Assembly); http.StartListen(7777); Console.WriteLine("http服务启动成功"); Process.Start("http://localhost:7777/api/token/test?x=1&y=2"); Console.ReadLine(); }
static void Main(string[] args) { var http = new NetworkSocket.Http.HttpServer(); http.GlobalFilter.Add(new ExceptionFilterAttribute()); http.BindController(typeof(Program).Assembly); http.StartListen(7777); Console.WriteLine("http服务启动成功"); Process.Start("http://localhost:7777/power/index"); Console.ReadLine(); }
static void Main(string[] args) { Console.Title = typeof(Program).Namespace; var http = new NetworkSocket.Http.HttpServer(); http.GlobalFilters.Add(new ExceptionFilterAttribute()); http.BindController(typeof(Program).Assembly); http.StartListen(7777); if (Directory.Exists("js") == false) { Directory.SetCurrentDirectory("../../"); } Console.WriteLine("http服务启动成功"); Process.Start("http://localhost:7777/power/index"); Console.ReadLine(); }