Changed default host from localhost to 127.0.0.1

Made dev shortcuts not global
Added host and port arguments in electron launcher
This commit is contained in:
RemixDev
2021-06-29 15:58:25 +02:00
parent 00e2d0724b
commit 2a005b513f
5 changed files with 33 additions and 24 deletions

6
server/dist/app.js vendored
View File

@@ -21,10 +21,10 @@ const errors_1 = require("./helpers/errors");
// TODO: Remove type assertion while keeping correct types
const argv = yargs_1.default(helpers_1.hideBin(process.argv)).options({
port: { type: 'string', default: '6595' },
host: { type: 'string', default: 'localhost' }
host: { type: 'string', default: '127.0.0.1' }
}).argv;
const DEEMIX_PORT = port_1.normalizePort((_a = process.env.PORT) !== null && _a !== void 0 ? _a : argv.port);
const DEEMIX_HOST = (_b = process.env.HOST) !== null && _b !== void 0 ? _b : argv.host;
const DEEMIX_PORT = port_1.normalizePort((_a = process.env.DEEMIX_PORT) !== null && _a !== void 0 ? _a : argv.port);
const DEEMIX_HOST = (_b = process.env.DEEMIX_HOST) !== null && _b !== void 0 ? _b : argv.host;
const debug = debug_1.default('deemix-gui:server');
exports.app = express_1.default();
exports.wss = new ws_1.Server({ noServer: true });

View File

@@ -19,11 +19,11 @@ import { consoleInfo } from './helpers/errors'
// TODO: Remove type assertion while keeping correct types
const argv = yargs(hideBin(process.argv)).options({
port: { type: 'string', default: '6595' },
host: { type: 'string', default: 'localhost' }
host: { type: 'string', default: '127.0.0.1' }
}).argv as Arguments
const DEEMIX_PORT = normalizePort(process.env.PORT ?? argv.port)
const DEEMIX_HOST = process.env.HOST ?? argv.host
const DEEMIX_PORT = normalizePort(process.env.DEEMIX_PORT ?? argv.port)
const DEEMIX_HOST = process.env.DEEMIX_HOST ?? argv.host
const debug = initDebug('deemix-gui:server')
export const app: Application = express()