cleanup + misc fixes
This commit is contained in:
parent
8bcc9530e9
commit
3dcb8cf74c
@ -9,18 +9,12 @@
|
|||||||
},
|
},
|
||||||
"shardCount": 1,
|
"shardCount": 1,
|
||||||
"serverOptions": {
|
"serverOptions": {
|
||||||
|
"domain": "YOUR DOMAIN HERE",
|
||||||
"serveFiles": "./files",
|
"serveFiles": "./files",
|
||||||
"callbackPath": "/api/login",
|
"callbackPath": "/api/login",
|
||||||
"http": {
|
"http": {
|
||||||
"port": 4000
|
"port": 4000
|
||||||
},
|
},
|
||||||
"validUserTypes": [
|
|
||||||
"user",
|
|
||||||
"service",
|
|
||||||
"system"
|
|
||||||
],
|
|
||||||
"registrationEnabled": true,
|
|
||||||
"requireCodeForRegister": true,
|
|
||||||
"OAuthProviders": [
|
"OAuthProviders": [
|
||||||
{
|
{
|
||||||
"name": "Discord",
|
"name": "Discord",
|
||||||
|
@ -142,8 +142,8 @@ class Server extends EventEmitter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!options.domain)
|
if (!options.domain || options.domain.includes('YOUR DOMAIN HERE'))
|
||||||
this.#logger.warn('No domain provided in options.json:serverOptions');
|
throw Util.fatal('No domain provided in options.json:serverOptions');
|
||||||
this.#domain = options.domain;
|
this.#domain = options.domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,8 +265,10 @@ class Util
|
|||||||
* @throws {Error}
|
* @throws {Error}
|
||||||
* @memberof Util
|
* @memberof Util
|
||||||
*/
|
*/
|
||||||
static fatal (error: Error): never
|
static fatal (error: Error | string): never
|
||||||
{
|
{
|
||||||
|
if (typeof error === 'string')
|
||||||
|
error = new Error(error);
|
||||||
if (process.send)
|
if (process.send)
|
||||||
process.send({ _fatal: true, message: error.message });
|
process.send({ _fatal: true, message: error.message });
|
||||||
throw error;
|
throw error;
|
||||||
|
Loading…
Reference in New Issue
Block a user