示例#1
0
        protected static void boot(string javascriptURL)
        {
            Console.WriteLine("");
            Console.WriteLine("Downloading target script: " + javascriptURL);
            string source = "";

            using (WebClient client = new WebClient()) {
                source = client.DownloadString(javascriptURL);
            }
            Console.WriteLine("Retrieved source: " + source.Length + " characters received");

            Dresser d = new Dresser(source);

            d.prepareSource();
            Console.WriteLine("Booting server: " + "localhost:80000");
            HydraServer server = new HydraServer(d);

            server.run();
            Console.WriteLine("Server running. Press any key to stop...");
            Console.ReadKey();
            server.stop();
        }
示例#2
0
 public HydraServer(Dresser d) : this(new string[] { "http://localhost:9999/hydra/" })
 {
     dresser     = d;
     collections = new List <HydraCollection>();
     template    = File.ReadAllText("interface_template.html");
 }