summary refs log tree commit diff
path: root/bundle/src/start.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 20:54:52 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 20:54:52 +0200
commitea8c47d64eab6206599008cb8646045e0d5348fc (patch)
treea94e68ab517e7d3c6dc78571a058e4a62f0012bb /bundle/src/start.ts
parent:bug: fix util types (diff)
downloadserver-ea8c47d64eab6206599008cb8646045e0d5348fc.tar.xz
:bug: fix bundle listen
Diffstat (limited to '')
-rw-r--r--bundle/src/start.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index 2bfb0069..ee012c15 100644
--- a/bundle/src/start.ts
+++ b/bundle/src/start.ts
@@ -60,6 +60,11 @@ if (cluster.isMaster && !process.env.masterStarted) {
 		console.log(`[Database] started`);
 		console.log(`[Process] running with pid: ${process.pid}`);
 
+		if (cores === 1) {
+			require("./Server.js");
+			return;
+		}
+
 		// Fork workers.
 		for (let i = 0; i < cores; i++) {
 			cluster.fork();