From 78dbc306b8dcfefc4e3a38035a22fd2432a7e6f6 Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Sat, 30 Apr 2016 14:28:07 +0300 Subject: [PATCH] Fix typo `host` -> `hostname` --- README.md | 2 +- src/devTools.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2cd6247..4997bb7 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Name | Description `startOn` | *String* or *Array of strings* indicating an action or a list of actions, which should start remote monitoring (when `realtime` is `false`). `stopOn` | *String* or *Array of strings* indicating an action or a list of actions, which should stop remote monitoring. `sendOn` | *String* or *Array of strings* indicating an action or a list of actions, which should trigger sending the history to the monitor (without starting it). *Note*: when using it, add a `fetch` polyfill if needed. -`sendTo` | *String* url of the monitor to send the history when `sendOn` is triggered. By default is `${secure ? 'https' : 'http'}://${host}:${port}`. +`sendTo` | *String* url of the monitor to send the history when `sendOn` is triggered. By default is `${secure ? 'https' : 'http'}://${hostname}:${port}`. `id` | *String* to identify the instance when sending the history triggered by `sendOn`. You can use, for example, user id here, to know who sent the data. All parameters are optional. You have to provide at least `port` property to use `localhost` instead of `remotedev.io` server. diff --git a/src/devTools.js b/src/devTools.js index ac59036..e0d41f6 100644 --- a/src/devTools.js +++ b/src/devTools.js @@ -99,7 +99,7 @@ function init(options) { if (options.port) { socketOptions = { port: options.port, - host: options.hostname || 'localhost', + hostname: options.hostname || 'localhost', secure: options.secure }; } else socketOptions = defaultSocketOptions; @@ -109,7 +109,7 @@ function init(options) { sendOn = str2array(options.sendOn); if (sendOn) { sendTo = options.sendTo || - `${socketOptions.secure ? 'https' : 'http'}://${socketOptions.host}:${socketOptions.port}`; + `${socketOptions.secure ? 'https' : 'http'}://${socketOptions.hostname}:${socketOptions.port}`; instanceId = options.id; } }