added socketio
This commit is contained in:
parent
9d0f1500e6
commit
d4e48004bc
@ -22,6 +22,7 @@
|
||||
"common\\services\\ASC.ElasticSearch\\ASC.ElasticSearch.csproj",
|
||||
"common\\services\\ASC.Feed.Aggregator\\ASC.Feed.Aggregator.csproj",
|
||||
"common\\services\\ASC.Notify\\ASC.Notify.csproj",
|
||||
"common\\services\\ASC.Socket.IO.Svc\\ASC.Socket.IO.Svc.csproj",
|
||||
"common\\services\\ASC.Studio.Notify\\ASC.Studio.Notify.csproj",
|
||||
"common\\services\\ASC.TelegramService\\ASC.TelegramService.csproj",
|
||||
"common\\services\\ASC.UrlShortener.Svc\\ASC.UrlShortener.Svc.csproj",
|
||||
|
@ -11,8 +11,6 @@ call start\stop.bat nopause
|
||||
dotnet build ..\asc.web.slnf /fl1 /flp1:logfile=asc.web.log;verbosity=normal
|
||||
echo.
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo install nodejs projects dependencies...
|
||||
echo.
|
||||
|
||||
@ -25,6 +23,10 @@ for /R "scripts\" %%f in (*.bat) do (
|
||||
|
||||
echo.
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo.
|
||||
|
||||
if "%1"=="nopause" goto end
|
||||
pause
|
||||
|
||||
|
4
build/run/SocketIO.bat
Normal file
4
build/run/SocketIO.bat
Normal file
@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.Socket.IO.Svc\bin\Debug\ASC.Socket.IO.Svc.exe urls=http://0.0.0.0:5028 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=socketio pathToConf=%cd%\config core:products:folder=%cd%\products core:products:subfolder=server socket:path=%cd%\common\ASC.Socket.IO
|
1
build/scripts/socketio.bat
Normal file
1
build/scripts/socketio.bat
Normal file
@ -0,0 +1 @@
|
||||
yarn install --cwd %~dp0../../common/ASC.Socket.IO/ --frozen-lockfile
|
@ -47,7 +47,7 @@ using StackExchange.Redis.Extensions.Newtonsoft;
|
||||
|
||||
namespace ASC.Socket.IO.Svc
|
||||
{
|
||||
public class Program
|
||||
public class Program
|
||||
{
|
||||
public async static Task Main(string[] args)
|
||||
{
|
||||
@ -92,7 +92,9 @@ public class Program
|
||||
})
|
||||
.ConfigureServices((hostContext, services) =>
|
||||
{
|
||||
services.AddMemoryCache();
|
||||
services.AddMemoryCache();
|
||||
services.AddHttpClient();
|
||||
|
||||
var diHelper = new DIHelper(services);
|
||||
|
||||
var redisConfiguration = hostContext.Configuration.GetSection("Redis").Get<RedisConfiguration>();
|
||||
|
@ -83,6 +83,12 @@ namespace ASC.Socket.IO.Svc
|
||||
try
|
||||
{
|
||||
var settings = ConfigurationExtension.GetSetting<SocketSettings>("socket");
|
||||
|
||||
var path = settings.Path;
|
||||
if (!Path.IsPathRooted(settings.Path))
|
||||
{
|
||||
path = Path.GetFullPath(CrossPlatform.PathCombine(HostEnvironment.ContentRootPath, settings.Path));
|
||||
}
|
||||
|
||||
PingInterval = settings.PingInterval.GetValueOrDefault(10000);
|
||||
ReconnectAttempts = settings.ReconnectAttempts.GetValueOrDefault(5);
|
||||
@ -93,7 +99,7 @@ namespace ASC.Socket.IO.Svc
|
||||
UseShellExecute = false,
|
||||
FileName = "node",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
Arguments = $"\"{Path.GetFullPath(CrossPlatform.PathCombine(HostEnvironment.ContentRootPath, settings.Path, "server.js"))}\"",
|
||||
Arguments = $"\"{Path.Combine(path, "server.js")}\"",
|
||||
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user