static void Main(string[] args) { var builder = new HostBuilder() .ConfigureServices((hostContext, services) => { services.UseXRPC(s => { JWTHelper.Init(); s.ServerOptions.LogLevel = BeetleX.EventArgs.LogType.Trace; s.ServerOptions.DefaultListen.Port = 9090; s.RPCOptions.ParameterFormater = new JsonPacket();//default messagepack }, typeof(Program).Assembly); }); builder.Build().Run(); }
public static void Init() { byte[] key = new byte[128]; new Random().NextBytes(key); Default = new JWTHelper("xrpc", "xrpc", key); }