-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (30 loc) · 935 Bytes
/
Program.cs
File metadata and controls
35 lines (30 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.IO;
using InEngine.Core;
namespace InEngine;
public static class Program
{
public static ServerHost ServerHost { get; set; }
private static void Main(string[] args)
{
/*
* Set current working directory as services use the system directory by default.
* Also, allow running the CLI from a different directory than the application root.
*/
Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
new ArgumentInterpreter().Interpret(args);
}
public static void RunServer()
{
var settings = InEngineSettings.Make();
ServerHost = new ServerHost
{
MailSettings = settings.Mail,
QueueSettings = settings.Queue,
};
ServerHost.Start();
Console.WriteLine("Press any key to exit...");
Console.ReadLine();
ServerHost.Dispose();
}
}