diff --git a/bundle/.gitignore b/bundle/.gitignore
index 7d2cb508..cf073d9c 100644
--- a/bundle/.gitignore
+++ b/bundle/.gitignore
@@ -1 +1,2 @@
-files/
\ No newline at end of file
+files/
+.env
\ No newline at end of file
diff --git a/bundle/package-lock.json b/bundle/package-lock.json
index aaa0c1ee..090935f4 100644
--- a/bundle/package-lock.json
+++ b/bundle/package-lock.json
@@ -15,6 +15,7 @@
"@fosscord/gateway": "file:../gateway",
"@fosscord/util": "file:../util",
"async-exit-hook": "^2.0.1",
+ "dotenv": "^10.0.0",
"express": "^4.17.1",
"missing-native-js-functions": "^1.2.15",
"node-os-utils": "^1.3.5",
@@ -195,6 +196,9 @@
"ts-node-dev": "^1.1.6",
"ts-patch": "^1.4.4",
"typescript": "^4.2.3"
+ },
+ "optionalDependencies": {
+ "@yukikaze-bot/erlpack": "^1.0.1"
}
},
"../util": {
@@ -858,6 +862,14 @@
"node": ">=0.3.1"
}
},
+ "node_modules/dotenv": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
+ "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -1810,6 +1822,7 @@
"@types/node-fetch": "^2.5.12",
"@types/uuid": "^8.3.0",
"@types/ws": "^7.4.0",
+ "@yukikaze-bot/erlpack": "^1.0.1",
"@zerollup/ts-transform-paths": "^1.7.18",
"ajv": "^8.5.0",
"amqplib": "^0.8.0",
@@ -2336,6 +2349,11 @@
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true
},
+ "dotenv": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
+ "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
+ },
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
diff --git a/bundle/package.json b/bundle/package.json
index fa6fe669..f68ff0bd 100644
--- a/bundle/package.json
+++ b/bundle/package.json
@@ -54,6 +54,7 @@
"@fosscord/gateway": "file:../gateway",
"@fosscord/util": "file:../util",
"async-exit-hook": "^2.0.1",
+ "dotenv": "^10.0.0",
"express": "^4.17.1",
"missing-native-js-functions": "^1.2.15",
"node-os-utils": "^1.3.5",
diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index f68a65bf..be67a122 100644
--- a/bundle/src/start.ts
+++ b/bundle/src/start.ts
@@ -2,6 +2,8 @@
import cluster from "cluster";
import os from "os";
import { initStats } from "./stats";
+import { config } from "dotenv";
+config();
// TODO: add tcp socket event transmission
const cores = 1 || Number(process.env.threads) || os.cpus().length;
diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index e6941db2..d5ceeff7 100644
--- a/bundle/src/stats.ts
+++ b/bundle/src/stats.ts
@@ -5,7 +5,6 @@ export function initStats() {
console.log(`[Path] running in ${__dirname}`);
console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`);
console.log(`[System] ${os.platform()} ${os.arch()}`);
- console.log(`[Database] started`);
console.log(`[Process] running with pid: ${process.pid}`);
setInterval(async () => {
|