Exemple #1
0
        static void Main(string[] args)
        {
            ObjectFactory.Initialize(x =>
            {
                x.Scan(y =>
                {
                    y.WithDefaultConventions();
                    y.LookForRegistries();
                    //y.AssembliesFromPath(Environment.CurrentDirectory, a => a.FullName.StartsWith("Lending"));
                    y.AssembliesFromPath(Environment.CurrentDirectory, Blah);
                });

            });

            ObjectFactory.AssertConfigurationIsValid();
            string blah = ObjectFactory.WhatDoIHave();

            SchemaUpdater.UpdateSchema();

            //using (var host = new NancyHost(new Uri("http://localhost:8080")))
            //{
            //    host.Start();
            //    Console.WriteLine("Nancy has started");
            //    Console.ReadLine();
            //}

            var host = new AppHost();
            host.Init();
            host.Start("http://localhost:8085/");
            Console.WriteLine("Listening, GO!");
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var listeningOn = args.Length == 0 ? "http://*:1337/" : args[0];
            var appHost = new AppHost();
            appHost.Init();
            appHost.Start(listeningOn);

            Console.WriteLine("AppHost Created at {0}, listening on {1}",
                DateTime.Now, listeningOn);

            Console.ReadKey();
        }