You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
3.5 KiB
55 lines
3.5 KiB
using Infrastructure.Application;
|
|
using Infrastructure.Configuration;
|
|
using Infrastructure.Extensions;
|
|
using Infrastructure.Web.Hosting;
|
|
using Microsoft.AspNetCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace IoTNode
|
|
{
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1052:Static holder types should be Static or NotInheritable", Justification = "<挂起>")]
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
|
var host = "localhost";
|
|
var stream = "192.168.3.124";
|
|
var cpuNumber = Helper.Instance.GetCPUNumber();
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.Run<Startup>(new List<EFConfigurationValue> {
|
|
new EFConfigurationValue { Id = "sn", Value= cpuNumber },
|
|
new EFConfigurationValue { Id = "code", Value= "根据设备编号生成的授权码" },
|
|
new EFConfigurationValue { Id = "openapi.name", Value= "v1" },
|
|
new EFConfigurationValue { Id = "openapi.title", Value= "fbee api" },
|
|
new EFConfigurationValue { Id = "openapi.version", Value= "1.0" },
|
|
new EFConfigurationValue { Id = "security:key", Value= "111111111111111111111111"},
|
|
new EFConfigurationValue { Id = "jwt:key", Value= "111111111111111111111111"},
|
|
new EFConfigurationValue { Id = "email:host", Value= "nbaxp.com"},
|
|
new EFConfigurationValue { Id = "email:port", Value= "25"},
|
|
new EFConfigurationValue { Id = "email:user", Value= "admin@nbaxp.com"},
|
|
new EFConfigurationValue { Id = "email:password", Value= "aA123456"},
|
|
new EFConfigurationValue { Id = "server.ip", Value= "" },
|
|
new EFConfigurationValue { Id = "server.urls", Value= "http://*:8002" },
|
|
new EFConfigurationValue { Id = "notify:enabled", Value= "true"},
|
|
new EFConfigurationValue { Id = "notify:host", Value= $"{host}:8011"},
|
|
new EFConfigurationValue { Id = "timer.seconds", Value="60"},
|
|
new EFConfigurationValue { Id = "onvif.timer", Value="1"},
|
|
new EFConfigurationValue { Id = "onvif.speed", Value="0.2"},
|
|
new EFConfigurationValue { Id = "camera.usr", Value="admin"},
|
|
new EFConfigurationValue { Id = "camera.pwd", Value="dsideal123"},
|
|
new EFConfigurationValue { Id = "stream.rtmp", Value=stream},
|
|
new EFConfigurationValue { Id = "stream.flv", Value=$"{stream}"},
|
|
new EFConfigurationValue { Id = "stream.hls", Value=$"{stream}"},
|
|
new EFConfigurationValue { Id = "ffmpeg.args", Value=" -y -threads {0} -rtsp_transport tcp -use_wallclock_as_timestamps 1 -stimeout 3000000 -i \"{1}\" -fflags +genpts -c copy -f flv \"{2}\""},
|
|
new EFConfigurationValue { Id = "fbee.writelist", Value=""},
|
|
new EFConfigurationValue { Id = "camera.writelist", Value=""},
|
|
//
|
|
new EFConfigurationValue { Id = "name", Value= "物联网节点"},
|
|
new EFConfigurationValue { Id = "logo", Value= "/images/logo.png",Type= InputType.ImageUrl},
|
|
new EFConfigurationValue { Id = "copyright", Value= "Copyright © {now} Company. All rights reserved",Type= InputType.Html}
|
|
});
|
|
}
|
|
}
|
|
} |