static void Main(params string[] args) { #if DEBUG Assembly.LoadFile(Path.Combine(Directory.GetCurrentDirectory(), "Aqueduct.Appia.Razor.dll")); #endif var options = new Options(); ICommandLineParser parser = new CommandLineParser(); parser.ParseArguments(args, options); if (string.IsNullOrEmpty(options.ExportPath) == false) { var exporter = new HtmlExporter(options.ExportPath, new Configuration(), new Aqueduct.Appia.Core.Bootstrapper()) { Verbose = options.Verbose }; exporter.Initialise(); exporter.Export(); } else { var ip = options.Address == "*" ? IPAddress.Any : IPAddress.Parse(options.Address); var nancyHost = new NancyHost(ip, options.Port, new Aqueduct.Appia.Core.Bootstrapper()); nancyHost.Start(); Console.WriteLine(String.Format("Nancy now listening - navigate to http://{0}:{1}/. Press enter to stop", options.Address, options.Port)); Console.ReadKey(); nancyHost.Stop(); Console.WriteLine("Stopped. Good bye!"); } }