This tool is used to collect dev information in your collar.js based application.
For node.js application
npm install collar.js-dev-client --save-dev
For web application, you can directly download it from github:
https://github.com/bhou/collarjs-dist
For node.js application
const DevToolAddon = require('collar.js-dev-client');
collar.use(new DevToolAddon());
For web application
<script src="collar.js-dev-client.js"></script>
It will register a global variable DevToolAddon
;
collar.use(new DevToolAddon());
You can pass options to the DevToolAddon
constructor:
- process: string, the process name
- url: string, the collar-dev-server url, default: ws://localhost:7500
- interval: long, the interval to send collected data to collar dev server in milliseconds, default, 1000
You need to use the right version of collar.js-dev-client to match the collar dev server version.
Usually both of them use the same major version to keep the compatibility:
collar-dev-server v0.* matches collar.js-dev-client v0.* collar-dev-server v1.* matches collar.js-dev-client v1.*