Example #1
0
        public static void StartServer()
        {
#if DEBUG
            MaxPages = 1;
#endif

            Entries.Add(new Entry()
            {
                IndexDate = "2019-7-16 4:22", Link = "https://github.com/thebitbrine", Repacker = "TheBitBrine", Size = "64 KB", Title = "Zorro v1.1"
            });

            Directory.CreateDirectory("Data");

            new Thread(UpdateLists)
            {
                IsBackground = true
            }.Start();

            API = new QuickMan();
            var Endpoints = new Dictionary <string, Action <HttpListenerContext> >();

            Endpoints.Add("query", Query);
            Endpoints.Add("/", Index);
            Endpoints.Add("Web", WebTools.Web);
            Endpoints.Add("open", OpenLink);
            Endpoints.Add("random", RandomGame);
            API.Start(8130, Endpoints, 20);
        }
Example #2
0
        public void Run()
        {
            API = new QuickMan();
            var Endpoints = new Dictionary <string, Action <HttpListenerContext> >();

            Endpoints.Add("*", Any);
            API.Start(Port, Endpoints, 20);
        }
Example #3
0
        public void Run()
        {
            GetUpdates();
            API = new QuickMan();
            var Endpoints = new Dictionary <string, Action <HttpListenerContext> >();

            Endpoints.Add("/", Index2);

            Endpoints.Add("read", Read);


            API.Start(80, Endpoints, 30);
        }