diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-04 22:06:17 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-04 22:06:17 +0200 |
commit | b1c1b681b9e5f47225e68580ad2e7059ba1d4f1e (patch) | |
tree | ad531c262186343554910dfdbb84bef0e52ecb59 /util | |
parent | :construction: different db engines (diff) | |
parent | Merge pull request #413 from Thesourtimes/master (diff) | |
download | server-b1c1b681b9e5f47225e68580ad2e7059ba1d4f1e.tar.xz |
Merge branch 'master' of http://github.com/fosscord/fosscord-server
Diffstat (limited to 'util')
-rw-r--r-- | util/package-lock.json | 11 | ||||
-rw-r--r-- | util/package.json | 1 | ||||
-rw-r--r-- | util/src/util/Database.ts | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/util/package-lock.json b/util/package-lock.json index f4129614..d48403dd 100644 --- a/util/package-lock.json +++ b/util/package-lock.json @@ -19,6 +19,7 @@ "lambert-server": "^1.2.10", "missing-native-js-functions": "^1.2.15", "multer": "^1.4.3", + "nanocolors": "^0.2.12", "node-fetch": "^2.6.1", "patch-package": "^6.4.7", "pg": "^8.7.1", @@ -4803,6 +4804,11 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nanocolors": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", + "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -11188,6 +11194,11 @@ "thenify-all": "^1.0.0" } }, + "nanocolors": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", + "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", diff --git a/util/package.json b/util/package.json index 0e81a544..3bdc04be 100644 --- a/util/package.json +++ b/util/package.json @@ -46,6 +46,7 @@ "lambert-server": "^1.2.10", "missing-native-js-functions": "^1.2.15", "multer": "^1.4.3", + "nanocolors": "^0.2.12", "node-fetch": "^2.6.1", "patch-package": "^6.4.7", "pg": "^8.7.1", diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts index 369a403c..5f622805 100644 --- a/util/src/util/Database.ts +++ b/util/src/util/Database.ts @@ -2,6 +2,7 @@ import path from "path"; import "reflect-metadata"; import { Connection, createConnection } from "typeorm"; import * as Models from "../entities"; +import { yellow, green } from "nanocolors"; // UUID extension option is only supported with postgres // We want to generate all id's with Snowflakes that's why we have our own BaseEntity class @@ -16,7 +17,7 @@ export function initDatabase() { const type = dbConnectionString.includes(":") ? dbConnectionString.split(":")[0]?.replace("+srv", "") : "sqlite"; const isSqlite = type.includes("sqlite"); - console.log(`[Database] connecting to ${type} db`); + console.log(`[Database] ${yellow(`connecting to ${type} db`)}`); // @ts-ignore promise = createConnection({ type, @@ -34,7 +35,7 @@ export function initDatabase() { promise.then((connection) => { dbConnection = connection; - console.log("[Database] connected"); + console.log(`[Database] ${green("connected")}`); }); return promise; |