forked from Azure/azure-functions-host
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
34 lines (29 loc) · 932 Bytes
/
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
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Script.Config;
namespace Microsoft.Azure.WebJobs.Script.Host
{
public static class Program
{
public static void Main(string[] args)
{
if (args == null)
{
throw new ArgumentNullException("args");
}
string rootPath = Environment.CurrentDirectory;
if (args.Length > 0)
{
rootPath = (string)args[0];
}
var config = new ScriptHostConfiguration()
{
RootScriptPath = rootPath,
IsSelfHost = true
};
var scriptHostManager = new ScriptHostManager(config);
scriptHostManager.RunAndBlock();
}
}
}