cleanup + misc fixes
This commit is contained in:
parent
8bcc9530e9
commit
3dcb8cf74c
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user