예제 #1
0
        public void StartMalinHost()
        {
            Host = MalinHost.Start("/port:" + HostUrl.Port);
            Host.UnpackDestination = UnpackDirectory;
            Host.AuthorizationToken = AuthorizationToken;

            DeleteFiles();
        }
예제 #2
0
        public static MalinWebHost Start(string[] args)
        {
            var port = 3030;
            if (args != null)
            {
                var portArgument = args.FirstOrDefault(arg => arg.StartsWith("/port:"));
                if (!string.IsNullOrWhiteSpace(portArgument))
                {
                    port = int.Parse(portArgument.Substring("/port:".Length));
                }
            }

            var result = new MalinWebHost
                {
                    _webApp = WebApp.Start<MalinHostStartup>("http://+:" + port)
                };

            return result;
        }