Add force server url override
This commit is contained in:
parent
d54b69ce80
commit
65e3cb9797
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cubetiq/hlt",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "A lightweight http tunnel client using nodejs and socket.io client",
|
||||
"main": "dist/client.js",
|
||||
"bin": {
|
||||
|
@ -245,8 +245,9 @@ program
|
||||
config = JSON.parse(fs.readFileSync(configFilePath, "utf8"));
|
||||
}
|
||||
|
||||
if (!config.server) {
|
||||
config.server = options.server || SERVER_DEFAULT_URL;
|
||||
// Force reset config server from client init
|
||||
if (!config.server || options.force) {
|
||||
config.server = options.server || config.server || SERVER_DEFAULT_URL;
|
||||
}
|
||||
|
||||
if (!config.token && options.token) {
|
||||
@ -267,7 +268,7 @@ program
|
||||
|
||||
let errorCode = 0;
|
||||
if (!config.token || options.force) {
|
||||
console.log("Generating token...");
|
||||
console.log(`Generating token from server: ${config.server}`);
|
||||
await getTokenFree(config.server, {
|
||||
timestamp: (new Date().getTime()),
|
||||
clientId: config.clientId,
|
||||
|
Loading…
Reference in New Issue
Block a user