@aspecto/core
v1.1.22
Published
Aspecto metric collector
Downloads
217
Keywords
Readme
Aspecto
Your API is critical for your success and we wat to help you protect it:
How it works
- Install this package - it will report to our servers
- Install our VSCode extension
This package and the extension will comminucate and if you are about to make a breaking change we will notify you with VSCode
For more details check out our website
Start using
Install
npm install @aspecto/core
Usage
const aspecto = require('@aspecto/core').init();
- In the root folder create a aspecto.json file with {"token" : "-- token goes here --"}
- You can get your token from here
Usage in CLI
@aspecto/core
uses websockets to send the data it collects.
An open websocket connection will keep the node.js process running which may not be desired in CLI apps.
In order to close the WS connection that @aspecto/core
opens, call a callback that is being returned by init
function, like so:
const aspecto = require('@aspecto/core').init();
// your app's code
aspecto.close();