From e0f62f3e0649000b0b142015b7a366f4ff009bd9 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 17 Nov 2021 22:18:08 +0000 Subject: [PATCH] update default url --- package.json | 2 +- src/client.ts | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 99d2e22..30e8472 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "micro-js-client", - "version": "0.0.1", + "version": "0.0.2", "description": "Micro JS Client", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/src/client.ts b/src/client.ts index 4dc53ba..db161b3 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,8 +4,7 @@ import * as url from 'url'; import {Stream} from './stream'; const defaultPrefix = 'v1/'; -const defaultLocal = 'http://localhost:8080/'; -const defaultLive = 'https://api.m3o.com/'; +const defaultAddress = 'http://localhost:8080/'; export interface Options { token?: string; @@ -15,8 +14,6 @@ export interface Options { address?: string; // Helper flag to set the url prefix of the server prefix?: string; - // Helper flag to help users connect to the default local address - local?: boolean; } /** @@ -26,14 +23,12 @@ export interface ClientOptions { token?: string; address: string; prefix: string; - local: boolean; } export class Client { public options: ClientOptions = { - address: defaultLive, + address: defaultAddress, prefix: defaultPrefix, - local: false, }; constructor(options?: Options) { @@ -41,10 +36,6 @@ export class Client { if (options.token) { this.options.token = options.token; } - if (options.local) { - this.options.local = true; - this.options.address = defaultLocal; - } if (options.address) { this.options.address = options.address; }