Added MySQL connection.

This commit is contained in:
2018-04-12 05:35:47 +01:00
parent 69e91aa53c
commit b4372a802f
4 changed files with 48 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
*******************************************************************************/
using System;
using cicm_web.Database;
using DiscImageChef.Interop;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
@@ -38,6 +39,8 @@ namespace cicm_web
{
public static class Program
{
static cicm_web.Database.Mysql database;
public static void Main(string[] args)
{
Console.Clear();
@@ -103,6 +106,8 @@ namespace cicm_web
DetectOS.IsMono ? "Mono" : ".NET Core",
DetectOS.IsMono ? Version.GetMonoVersion() : Version.GetNetCoreVersion());
Console.WriteLine("\u001b[31;1mConnecting to MySQL database...\u001b[0m");
database = new Mysql("localhost", "cicm", "cicm", 3306, "cicmpass");
Console.WriteLine("\u001b[31;1mStarting web server...\u001b[0m");
BuildWebHost(args).Run();