-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProgram.cs
47 lines (42 loc) · 1.35 KB
/
Program.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
using NodeBlock.Engine;
using NodeBlock.Engine.API;
using NodeBlock.Engine.Interop;
using NodeBlock.Engine.Nodes;
using System;
using System.Numerics;
using NodeBlock.Engine.Encoding;
using System.IO;
using System.Runtime.InteropServices;
using NodeBlock.Engine.Storage.MariaDB;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
using NLog;
using NLog.Config;
using NLog.Targets;
namespace NodeBlock.CLI
{
class Program
{
static void Main(string[] args)
{
DotNetEnv.Env.Load();
NodeBlockExporter.ExportNodesSchema(Environment.GetEnvironmentVariable("node_schema_path"));
try
{
// init graphs cost database updater
GraphsContainer.InitConsumingGraphCosts();
// init graphs that was live on last run
if(Environment.GetEnvironmentVariable("relaunch_last_graph") == "true")
{
GraphsContainer.InitActiveGraphs();
}
new InternalApi(new string[] { }, "0.0.0.0", 1337).InitApi();
}
catch (Exception error)
{
Console.WriteLine("Unable to init GraphLinq Engine API: {0}", error.Message);
}
Console.ReadLine();
}
}
}