Program.cs 680 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Net.ApiService;
  3. using System.Fire.Ini;
  4. namespace GregorCalendus {
  5. class Program {
  6. public static iniHandle config;
  7. static void Main(string[] args) {
  8. config = new iniHandle("config/services.conf");
  9. ushort port = config["GregorCalendus"]["Port"].UInt16;
  10. if (port == 0)
  11. port = 8005;
  12. ApiServer api = new ApiServer("./www", port);
  13. api.Request += Api_Request;
  14. api.Start();
  15. System.ConsoleApp.ConsoleAdvanced.Run("Gregor");
  16. }
  17. private static void Api_Request(object sender, RequestEventArgs e) {
  18. }
  19. }
  20. }