Cleanup some files and setting logEvel based on dev env
This commit is contained in:
parent
518d46f410
commit
62ef572fbf
@ -4,7 +4,6 @@ import getLevelDB from "../storage";
|
|||||||
import PathLock from "./lock";
|
import PathLock from "./lock";
|
||||||
import Query from "./query";
|
import Query from "./query";
|
||||||
import { Observable } from "@hibas123/utils";
|
import { Observable } from "@hibas123/utils";
|
||||||
import Logging from "@hibas123/logging";
|
|
||||||
|
|
||||||
export class DatabaseManager {
|
export class DatabaseManager {
|
||||||
static databases = new Map<string, Database>();
|
static databases = new Map<string, Database>();
|
||||||
|
@ -4,6 +4,9 @@ import config from "./config";
|
|||||||
import { DatabaseManager } from "./database/database";
|
import { DatabaseManager } from "./database/database";
|
||||||
import { createServer } from "http";
|
import { createServer } from "http";
|
||||||
import { ConnectionManager } from "./connection";
|
import { ConnectionManager } from "./connection";
|
||||||
|
import { LoggingTypes } from "@hibas123/logging";
|
||||||
|
|
||||||
|
Logging.logLevel = config.dev ? LoggingTypes.Debug : LoggingTypes.Log;
|
||||||
|
|
||||||
DatabaseManager.init().then(() => {
|
DatabaseManager.init().then(() => {
|
||||||
const http = createServer(Web.callback());
|
const http = createServer(Web.callback());
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import * as Router from "koa-router";
|
import * as Router from "koa-router";
|
||||||
import Settings from "../../settings";
|
import Settings from "../../settings";
|
||||||
import getForm from "../helper/form";
|
import getForm from "../helper/form";
|
||||||
import Logging from "@hibas123/nodelogging";
|
|
||||||
import getTable from "../helper/table";
|
import getTable from "../helper/table";
|
||||||
import { BadRequestError, NoPermissionError } from "../helper/errors";
|
import { BadRequestError, NoPermissionError } from "../helper/errors";
|
||||||
import { DatabaseManager } from "../../database/database";
|
import { DatabaseManager } from "../../database/database";
|
||||||
import { FieldEncoder } from "../../database/query";
|
import { FieldEncoder } from "../../database/query";
|
||||||
import getTemplate from "../helper/hb";
|
|
||||||
import config from "../../config";
|
import config from "../../config";
|
||||||
|
|
||||||
const AdminRoute = new Router();
|
const AdminRoute = new Router();
|
||||||
|
Reference in New Issue
Block a user