diff --git a/index.mjs b/index.mjs index 2de405e..b80fe47 100644 --- a/index.mjs +++ b/index.mjs @@ -2,8 +2,8 @@ import axios from 'axios' import { v4 as uuid } from 'uuid' import md5 from 'md5' -const LIBRARY_VERSION = '0.0.1' -const LIBRARY_NAME = 'cyclic-segment' +const LIBRARY_VERSION = process.env.npm_package_version || 'unknown' +const LIBRARY_NAME = process.env.npm_package_name || 'analytics-async' export async function track(msg) { return call('track', msg) diff --git a/package.json b/package.json index 308a3b5..fd2fd42 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "The hassle-free way to integrate analytics into any node application w/o dropping API calls.", "main": "index.mjs", "scripts": { + "start": "node index.mjs", "test": "echo \"Error: no test specified\" && exit 1" }, "author": {