localhost for domain in development
This commit is contained in:
parent
bb272881fb
commit
3563eeaf23
@ -2,7 +2,7 @@
|
||||
const { EventEmitter } = require('node:events');
|
||||
// const { inspect } = require('node:util');
|
||||
const path = require('node:path');
|
||||
const http = require('node:http2');
|
||||
const http = require('node:http');
|
||||
|
||||
// External
|
||||
const { LoggerClient } = require('@navy.gif/logger');
|
||||
@ -41,8 +41,7 @@ class Server extends EventEmitter {
|
||||
|
||||
if (!httpOpts?.port) return Util.fatal(new Error(`Missing http.port in server options`));
|
||||
this.port = httpOpts.port + this._shardId;
|
||||
this.domain = options.domain;
|
||||
|
||||
this.domain = NODE_ENV === 'development' ? `localhost:${this.port}` : options.domain;
|
||||
|
||||
this.server = null;
|
||||
this.app = express();
|
||||
|
@ -15,7 +15,7 @@ class Endpoint {
|
||||
|
||||
// Subpaths that should exist on *all* endpoints, the subpaths property can be overwritten, so storing these separately to ensure they exist
|
||||
this._subpaths = [
|
||||
'/debug', 'post', this.toggleDebug.bind(this), [ server.authenticator.createAuthoriser('developer') ]
|
||||
[ '/debug', 'post', this.toggleDebug.bind(this), [ server.authenticator.createAuthoriser('developer') ]]
|
||||
];
|
||||
|
||||
this.middleware = [];
|
||||
|
Loading…
Reference in New Issue
Block a user