Skip to content

Commit c932a32

Browse files
committed
pr feedback
1 parent c9fd55f commit c932a32

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ Determine in realtime what's happening inside your node process from the termina
1515
### Install
1616
The preferred method is global install but can optionally be placed locally as well.
1717

18-
`npm install -g nodejs-dashboard`
18+
```bash
19+
% npm install -g nodejs-dashboard
20+
```
1921

2022

2123
#### Add the reporting module to your code
@@ -26,7 +28,9 @@ There are a couple patterns for including `nodejs-dashboard` in your code. Since
2628

2729
This pattern requires you to use a run-time flag (see below).
2830

29-
`nodejs-dashboard -- node -r nodejs-dashboard index.js`
31+
```bash
32+
% nodejs-dashboard -- node -r nodejs-dashboard index.js
33+
```
3034

3135
##### Including via code
3236

@@ -41,44 +45,47 @@ require("nodejs-dashboard");
4145
It's recommended that you create a npm script to launch the dashboard. How you decide to include the module will dictate the run script.
4246

4347
For example, if you want to conditionally include via requires flag see the following example.
44-
```
48+
49+
```js
4550
...
4651
"scripts": {
4752
"dev": "nodejs-dashboard -- node -r nodejs-dashboard index.js"
48-
}
53+
}
4954
...
5055
```
5156

5257
In this example we've included the module in a custom development entry point.
53-
```
58+
```js
5459
...
5560
"scripts": {
5661
"dev": "nodejs-dashboard node dev.index.js"
57-
}
62+
}
5863
...
5964
```
6065

6166
If your app requires additional arguments you'll need to pass the `--` flag to your script. For example:
6267

63-
```
68+
```js
6469
...
6570
"scripts": {
6671
"dev": "nodejs-dashboard -- node -m=false --bar=true index.js"
67-
}
72+
}
6873
...
6974
```
7075

7176
##### But I want to use something else to launch my app!
7277

7378
Most CLI interfaces provide a mechanism for launching other tools. If you're looking to use something like [nodemon](https://github.com/remy/nodemon) or [babel](https://github.com/babel/babel/tree/master/packages/babel-cli) checkout the exec options provided by the CLI.
7479

75-
`nodemon --exec "nodejs-dashboard babel-node" src/index.js`
80+
```bash
81+
% nodemon --exec "nodejs-dashboard babel-node" src/index.js
82+
```
7683

7784

7885
#### Launch your app
7986
Once you've completed these steps run the following in your terminal:
8087

81-
```
88+
```bash
8289
% npm run dev
8390
```
8491

0 commit comments

Comments
 (0)