diff --git a/options.json b/options.json index 98093f2..ce54b3b 100644 --- a/options.json +++ b/options.json @@ -9,18 +9,12 @@ }, "shardCount": 1, "serverOptions": { + "domain": "YOUR DOMAIN HERE", "serveFiles": "./files", "callbackPath": "/api/login", "http": { "port": 4000 }, - "validUserTypes": [ - "user", - "service", - "system" - ], - "registrationEnabled": true, - "requireCodeForRegister": true, "OAuthProviders": [ { "name": "Discord", diff --git a/src/server/Server.ts b/src/server/Server.ts index e538385..b7575ec 100644 --- a/src/server/Server.ts +++ b/src/server/Server.ts @@ -142,8 +142,8 @@ class Server extends EventEmitter } else { - if (!options.domain) - this.#logger.warn('No domain provided in options.json:serverOptions'); + if (!options.domain || options.domain.includes('YOUR DOMAIN HERE')) + throw Util.fatal('No domain provided in options.json:serverOptions'); this.#domain = options.domain; } diff --git a/src/util/Util.ts b/src/util/Util.ts index 5ee342b..8303455 100644 --- a/src/util/Util.ts +++ b/src/util/Util.ts @@ -265,8 +265,10 @@ class Util * @throws {Error} * @memberof Util */ - static fatal (error: Error): never + static fatal (error: Error | string): never { + if (typeof error === 'string') + error = new Error(error); if (process.send) process.send({ _fatal: true, message: error.message }); throw error;