summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2024-10-25 18:57:29 +0200
committerRory& <root@rory.gay>2024-10-28 00:32:18 +0100
commit2feb90475e12d23e892aef37bb01e2361dac4bc6 (patch)
tree79c7f9f6d669a59d53e56f4815e5fcd84b870513 /src
parentUpdate some patches, switch to node-fetch-commonjs, more updates (diff)
downloadserver-ts-2feb90475e12d23e892aef37bb01e2361dac4bc6.tar.xz
Fix module resolution when $CWD != .
Diffstat (limited to 'src')
-rw-r--r--src/api/start.ts3
-rw-r--r--src/bundle/start.ts4
-rw-r--r--src/cdn/start.ts3
-rw-r--r--src/gateway/start.ts3
4 files changed, 9 insertions, 4 deletions
diff --git a/src/api/start.ts b/src/api/start.ts

index 088c6f8de..4a3f858eb 100644 --- a/src/api/start.ts +++ b/src/api/start.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -require("module-alias/register"); +import moduleAlias from "module-alias"; +moduleAlias(__dirname + "../../../package.json"); process.on("uncaughtException", console.error); process.on("unhandledRejection", console.error); diff --git a/src/bundle/start.ts b/src/bundle/start.ts
index df50fd4ca..fe177cbc7 100644 --- a/src/bundle/start.ts +++ b/src/bundle/start.ts
@@ -17,7 +17,9 @@ */ // process.env.MONGOMS_DEBUG = "true"; -require("module-alias/register"); +import moduleAlias from "module-alias"; +moduleAlias(__dirname + "../../../package.json"); + import "reflect-metadata"; import cluster, { Worker } from "cluster"; import os from "os"; diff --git a/src/cdn/start.ts b/src/cdn/start.ts
index d793077d2..21da69e9f 100644 --- a/src/cdn/start.ts +++ b/src/cdn/start.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -require("module-alias/register"); +import moduleAlias from "module-alias"; +moduleAlias(__dirname + "../../../package.json"); import "dotenv/config"; import { CDNServer } from "./Server"; diff --git a/src/gateway/start.ts b/src/gateway/start.ts
index 8af96c130..b04048e1b 100644 --- a/src/gateway/start.ts +++ b/src/gateway/start.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -require("module-alias/register"); +import moduleAlias from "module-alias"; +moduleAlias(__dirname + "../../../package.json"); process.on("uncaughtException", console.error); process.on("unhandledRejection", console.error);