Improving version support

This commit is contained in:
Fabian Stamm 2019-11-14 16:40:57 +01:00
parent d48bf46231
commit 72e5c0dedd

View File

@ -5,11 +5,13 @@ import { DatabaseManager } from "./database/database";
import { createServer } from "http";
import { ConnectionManager } from "./connection";
import { LoggingTypes } from "@hibas123/logging";
import * as pk from "../package.json";
import { readFileSync } from "fs";
Logging.logLevel = config.dev ? LoggingTypes.Debug : LoggingTypes.Log;
Logging.log("Starting Database version:", pk.version);
const version = JSON.parse(readFileSync("./package.json").toString()).version;
Logging.log("Starting Database version:", version);
DatabaseManager.init().then(() => {
const http = createServer(Web.callback());