From 8e730fdfae7ad5a81b99a5d1dc76f59e6995ae52 Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:28:24 +0200 Subject: [PATCH] Tried to fix typescript not working on pterodactyl --- package.json | 1 + src/backupStartup.mjs | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/backupStartup.mjs diff --git a/package.json b/package.json index df895fc..2a2f7be 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "scripts": { "verify": "tsc -p ./tsconfig.json", "start": "npx tsx ./src/index.ts", + "backupstart": "node ./src/backupStartup.mjs", "test": "npm run verify && npx tsx ./src/index.ts --dev-config --dev-database" }, "type": "commonjs", diff --git a/src/backupStartup.mjs b/src/backupStartup.mjs new file mode 100644 index 0000000..aa0b79e --- /dev/null +++ b/src/backupStartup.mjs @@ -0,0 +1,12 @@ +/** === ALTERNATIVE STARTUP METHOD === + * This file can be used to start the bot when the default `npm start` (npx tsx src/index.ts) doesn't work! + * It is not recommended to use this by default, but it is a backup option for certain panels that don't support typescript. + * + * RECOMMENDED ON: + * - pterodactyl based panels + * - pebblehost + * - and more + */ + +import "tsx" +import("./index.ts") \ No newline at end of file