Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1 from festivaledu/fix-path-names
Browse files Browse the repository at this point in the history
Fixed path names and creation
  • Loading branch information
vainamov committed Mar 10, 2019
2 parents 7105210 + 1adbe52 commit c293d23
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Program.cs
Expand Up @@ -7,9 +7,21 @@ namespace Neo.Server
internal class Program
{
private static readonly NeoServer server = new NeoServer();

private static readonly String configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"config.json");
private static readonly String dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"data");
private static readonly String pluginPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"plugins");


internal static void Main(string[] args) {
server.Initialize(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json"), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"data\"), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"plugins\"));
if (!Directory.Exists(dataPath)) {
Directory.CreateDirectory(dataPath);
}
if (!Directory.Exists(pluginPath)) {
Directory.CreateDirectory(pluginPath);
}

server.Initialize(configPath, dataPath, pluginPath);

server.Start();

Expand Down

0 comments on commit c293d23

Please sign in to comment.