2020-02-26 17:48:40 +00:00
|
|
|
using Grpc.Core;
|
|
|
|
|
using MagicOnion.Hosting;
|
|
|
|
|
using MagicOnion.Server;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading.Tasks;
|
2020-03-22 19:05:26 +00:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using RethinkDb.Driver;
|
2020-02-26 17:48:40 +00:00
|
|
|
|
|
|
|
|
namespace ChatApp.Server
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static async Task Main(string[] args)
|
|
|
|
|
{
|
2020-03-22 19:05:26 +00:00
|
|
|
var connection = RethinkDb.Driver.RethinkDB.R.Connection().Hostname("asgard.gamecult.games")
|
|
|
|
|
.Port(RethinkDBConstants.DefaultPort).Timeout(60).Connect();
|
|
|
|
|
|
2020-02-26 17:48:40 +00:00
|
|
|
GrpcEnvironment.SetLogger(new Grpc.Core.Logging.ConsoleLogger());
|
|
|
|
|
|
|
|
|
|
await MagicOnionHost.CreateDefaultBuilder()
|
|
|
|
|
.UseMagicOnion()
|
|
|
|
|
.RunConsoleAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|