Git Product home page Git Product logo

monitor-demo's Introduction

monitor

一个简易的前端监控 SDK DEMO,仅供学习,请勿在生产环境中使用。

文档

DEMO

克隆项目后,执行命令打开服务器。

npm run server

然后用 vscode 的 live server 插件访问 examples 目录上的 html 文件,即可尝试体验监控 SDK 的效果。同时打开开发者工具,点击 network 标签,可以看到上报数据的发送请求。

使用

直接 HTML 文件中引入使用

<script src="https://cdn.jsdelivr.net/npm/monitor-demo/dist/monitor.js"></script>
<script>
    monitor.init({
        url: 'http://localhost:8080/reportData'
    })
</script>

通过 npm 使用

安装

npm i monitor-demo

引入

import monitor from 'monitor-demo'
// 如果有 Vue 的话
import router from './router'
import Vue from 'vue'

monitor.init({
    url: 'http://localhost:8080/reportData',
    vue: {
      Vue,
      router,
    }
})

monitor-demo's People

Contributors

woai3c avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.