Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Chore readme examples #28

Merged
merged 5 commits into from
Oct 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ It's recommended that you create a npm script to launch the dashboard.
...
```

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

```
...
"scripts": {
"dev": "nodejs-dashboard -- node -myFlag=false --bar=true index.js"
}
...
```

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

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.

`nodemon --exec "nodejs-dashboard babel-node" src/index.js`


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

Expand All @@ -53,10 +70,10 @@ Options:
-e, --eventdelay [ms] Minimum threshold for event loop reporting, default 10ms
```

#####`-port`
#####`--port`
Under the hood the dashboard utilizes SocketIO with a default port of `9838`. If this conflicts with an existing service you can optionally change this value.

#####`-eventdelay`
#####`--eventdelay`
This tunes the minimum threshold for reporting event loop delays. The default value is `10ms`. Any delay below this value will be reported at `0`.

To gracefully exit and terminate the spawned process use one of: `Ctrl + C`, `Q`, or `ESC`.