Skip to content

Commit

Permalink
Fix typo host -> hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Apr 30, 2016
1 parent 601afa8 commit 78dbc30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/devTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 78dbc30

Please sign in to comment.