-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d9249b
commit c9bcd3b
Showing
16 changed files
with
289 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"dotnet-ef": { | ||
"version": "3.1.3", | ||
"commands": [ | ||
"dotnet-ef" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Aliyun.Serverless.Core.Http; | ||
using Microsoft.AspNetCore.Hosting; | ||
|
||
namespace MetingJS.Server.Fc | ||
{ | ||
public class FcRemoteEntrypoint : FcHttpEntrypoint | ||
{ | ||
protected override void Init(IWebHostBuilder builder) | ||
{ | ||
builder.UseStartup<Startup>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DefineConstants>TRACE;NETCORE21</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DefineConstants>TRACE;NETCORE21</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Aliyun.Serverless.Core.Http" Version="1.0.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MetingJS.Server\MetingJS.Server.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ActiveDebugProfile>MetingJS.Server.Fc</ActiveDebugProfile> | ||
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
|
||
namespace MetingJS.Server.Fc | ||
{ | ||
public class Program | ||
{ | ||
// public static void Main(string[] args) | ||
// { | ||
// CreateWebHostBuilder(args).Build().Run(); | ||
// } | ||
// | ||
// public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | ||
// WebHost.CreateDefaultBuilder(args) | ||
// .UseStartup<Startup>(); | ||
|
||
public static void Main(string[] args) | ||
{ | ||
Console.WriteLine("请不要这样启动"); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MetingJS.Server.Fc/Properties/PublishProfiles/FolderProfile.pubxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件 | ||
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。 | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<WebPublishMethod>FileSystem</WebPublishMethod> | ||
<PublishProvider>FileSystem</PublishProvider> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<SiteUrlToLaunchAfterPublish /> | ||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> | ||
<ExcludeApp_Data>False</ExcludeApp_Data> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier> | ||
<ProjectGuid>783cd8db-2b6e-477b-a57c-f603d4acfc64</ProjectGuid> | ||
<SelfContained>false</SelfContained> | ||
<publishUrl>bin\Release\netcoreapp2.1\publish\</publishUrl> | ||
<DeleteExistingFiles>True</DeleteExistingFiles> | ||
</PropertyGroup> | ||
</Project> |
11 changes: 11 additions & 0 deletions
11
MetingJS.Server.Fc/Properties/PublishProfiles/FolderProfile.pubxml.user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件 | ||
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。 | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<TimeStampOfAssociatedLegacyPublishXmlFile /> | ||
<_PublishTargetUrl>D:\MonoLogueChi\Documents\GitHub\MetingJS.Server\MetingJS.Server.Fc\bin\Release\netcoreapp2.1\publish\</_PublishTargetUrl> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Debug", | ||
"System": "Information", | ||
"Microsoft": "Information" | ||
} | ||
}, | ||
"AllowedHosts": "*", | ||
"WithOrigins": [ | ||
"*" | ||
], | ||
"Urls": "http://localhost:5000", | ||
"Url": "", | ||
"Replace": { | ||
"Url": [ | ||
[ "http://", "https://" ], | ||
[ "ws.stream.qqmusic.qq.com", "dl.stream.qqmusic.qq.com" ] | ||
], | ||
"Pic": [ | ||
[ "http://", "https://" ] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft": "Warning", | ||
"Microsoft.Hosting.Lifetime": "Information" | ||
} | ||
}, | ||
"AllowedHosts": "*", | ||
"WithOrigins": [ | ||
"*" | ||
], | ||
"Url": "", | ||
"DefaultServerProvider": "Tencent", | ||
"Replace": { | ||
"Url": [ | ||
[ "http://", "https://" ], | ||
[ "ws.stream.qqmusic.qq.com", "dl.stream.qqmusic.qq.com" ] | ||
], | ||
"Pic": [ | ||
[ "http://", "https://" ] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,49 @@ | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Hosting; | ||
#if LINUX | ||
using System.IO; | ||
#endif | ||
|
||
namespace MetingJS.Server | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStartup<Startup>().ConfigureKestrel((context, options) => | ||
{ | ||
#if LINUX | ||
if (File.Exists("/tmp/metingJS.Server.sock")) File.Delete("/tmp/metingJS.Server.sock"); | ||
options.ListenUnixSocket("/tmp/metingJS.Server.sock"); | ||
#endif | ||
}); | ||
}); | ||
} | ||
} | ||
#if NETCORE31 | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Hosting; | ||
#elif NETCORE21 | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
#endif | ||
|
||
#if LINUX | ||
using System.IO; | ||
#endif | ||
|
||
namespace MetingJS.Server | ||
{ | ||
public class Program | ||
{ | ||
#if NETCORE21 | ||
public static void Main(string[] args) | ||
{ | ||
CreateWebHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | ||
WebHost.CreateDefaultBuilder(args) | ||
.UseStartup<Startup>(); | ||
#elif NETCORE31 | ||
|
||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStartup<Startup>().ConfigureKestrel((context, options) => | ||
{ | ||
#if LINUX | ||
if (File.Exists("/tmp/metingJS.Server.sock")) File.Delete("/tmp/metingJS.Server.sock"); | ||
options.ListenUnixSocket("/tmp/metingJS.Server.sock"); | ||
#endif | ||
}); | ||
}); | ||
#endif | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.