Skip to content

A event tracking library for Node.js and web browsers

License

Notifications You must be signed in to change notification settings

peidongxie/lite-monitor

Repository files navigation

LiteMonitor

An event tracking library for Node.js and web browsers

Developers always want to have access to software runtime information to help them iterate, and event tracking help to better capture and analyze runtime data. A good event tracking library can make this much easier.

This project contains:

  • A basic event tracking library that provides maximum flexibility and complete event definition
  • An event tracking library for Node.js, including additional support for Express and Koa
  • An event tracking library for web browsers, including additional support for React
  • Some working examples using the event tracking library, including an Express example, a Koa example, and a React example
  • A software system for processing data from event tracking, including a front-end and a back-end

Table of Contents

Background

LiteMonitor started with a database online examination real-time monitoring system. During the development of the system, I found that I needed an event tracking library that could meet the following characteristics:

  • Lightweight
  • Low invasiveness
  • Well defined
  • Good compatibility

As a result, I built a JavaScript library and published it to npm. In February 2021, I started developing version 1.0 of the project.

Installation

The event tracking library

It uses Node.js and its package manager. Please make sure they are installed locally.

$ npm install @lite-monitor/base

or

$ yarn add @lite-monitor/base

or

$ pnpm add @lite-monitor/base

For more support for Node.js:

$ npm install @lite-monitor/node

or

$ yarn add @lite-monitor/node

or

$ pnpm add @lite-monitor/node

For more support for web browsers:

$ npm install @lite-monitor/web

or

$ yarn add @lite-monitor/web

or

$ pnpm add @lite-monitor/web

The software system for processing data from event tracking

It uses Node.js and pnpm. Please make sure they are installed locally.

$ git clone https://github.com/peidongxie/lite-monitor
$ cd lite-monitor
$ pnpm install

Usage

The event tracking library

It can be used in CommonJS project and ESM project. Please refer to the Examples.

The software system for processing data from event tracking

It can be started in production mode or development mode.

For production mode:

$ pnpm build:app
$ pnpm start:app

For development mode:

$ pnpm dev:app

Examples

Some working examples using the event tracking library are provided for this project.

Related Efforts

Maintainers

@peidongxie

Contributing

Feel free to open an issue or PR.

License

MIT © 谢沛东

About

A event tracking library for Node.js and web browsers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published