Skip to content

Commit 34e9528

Browse files
authored
Merge pull request #22 from punitx/patch-1
Update README.md
2 parents 4f41754 + 56abd14 commit 34e9528

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ npm install browserstack-local
1212

1313
## Example
1414

15-
```
15+
```node
1616
var browserstack = require('browserstack-local');
1717

18-
# creates an instance of Local
18+
//creates an instance of Local
1919
var bs_local = new browserstack.Local();
2020

21-
# replace <browserstack-accesskey> with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
21+
// replace <browserstack-accesskey> with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
2222
var bs_local_args = { 'key': '<browserstack-accesskey>' };
2323

24-
# starts the Local instance with the required arguments
24+
// starts the Local instance with the required arguments
2525
bs_local.start(bs_local_args, function() {
2626
console.log("Started BrowserStackLocal");
2727
});
2828

29-
# check if BrowserStack local instance is running
29+
// check if BrowserStack local instance is running
3030
console.log(bs_local.isRunning());
3131

32-
# stop the Local instance
32+
// stop the Local instance
3333
bs_local.stop(function() {
3434
console.log("Stopped BrowserStackLocal");
3535
});
@@ -42,31 +42,31 @@ Apart from the key, all other BrowserStack Local modifiers are optional. For the
4242

4343
#### Verbose Logging
4444
To enable verbose logging -
45-
```
45+
```node
4646
bs_local_args = { 'key': '<browserstack-accesskey>', 'v': 'true' }
4747
```
4848

4949
#### Folder Testing
5050
To test local folder rather internal server, provide path to folder as value of this option -
51-
```
51+
```node
5252
bs_local_args = { 'key': '<browserstack-accesskey>', 'f': '/my/awesome/folder' }
5353
```
5454

5555
#### Force Start
5656
To kill other running Browserstack Local instances -
57-
```
57+
```node
5858
bs_local_args = { 'key': '<browserstack-accesskey>', 'force': 'true' }
5959
```
6060

6161
#### Only Automate
6262
To disable local testing for Live and Screenshots, and enable only Automate -
63-
```
63+
```node
6464
bs_local_args = { 'key': '<browserstack-accesskey>', 'onlyAutomate': 'true' }
6565
```
6666

6767
#### Force Local
6868
To route all traffic via local(your) machine -
69-
```
69+
```node
7070
bs_local_args = { 'key': '<browserstack-accesskey>', 'forcelocal': 'true' }
7171
```
7272

@@ -78,13 +78,13 @@ To use a proxy for local testing -
7878
* proxyUser: Username for connecting to proxy (Basic Auth Only)
7979
* proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
8080

81-
```
81+
```node
8282
bs_local_args = { 'key': '<browserstack-accesskey>', 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password' }
8383
```
8484

8585
#### Local Identifier
8686
If doing simultaneous multiple local testing connections, set this uniquely for different processes -
87-
```
87+
```node
8888
bs_local_args = { 'key': '<browserstack-accesskey>', 'localIdentifier': 'randomstring' }
8989
```
9090

@@ -94,14 +94,14 @@ bs_local_args = { 'key': '<browserstack-accesskey>', 'localIdentifier': 'randoms
9494

9595
By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument.
9696
Path to specify local Binary path -
97-
```
97+
```node
9898
bs_local_args = { 'key': '<browserstack-accesskey>', 'binarypath': '/browserstack/BrowserStackLocal' }
9999
```
100100

101101
#### Logfile
102102
To save the logs to the file while running with the '-v' argument, you can specify the path of the file. By default the logs are saved in the local.log file in the present woring directory.
103103
To specify the path to file where the logs will be saved -
104-
```
104+
```node
105105
bs_local_args = { 'key': '<browserstack-accesskey>', 'v': 'true', 'logfile': '/browserstack/logs.txt' }
106106
```
107107

0 commit comments

Comments
 (0)