# vue-cli-plugin-apmapi

> apmApi config for private

Latest version **1.0.13** (published 2021-10-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-cli-plugin-apmapi
pnpm add vue-cli-plugin-apmapi
yarn add vue-cli-plugin-apmapi
bun add vue-cli-plugin-apmapi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2021-10-22 |
| First published | 2020-06-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hjdtl |

## Links

- npm: https://www.npmjs.com/package/vue-cli-plugin-apmapi
- npm.io page: https://npm.io/package/vue-cli-plugin-apmapi

## Recent versions

- 1.0.13 (latest) — 2021-10-22
- 1.0.12 — 2020-09-25
- 1.0.11 — 2020-07-28
- 1.0.10 — 2020-07-20
- 1.0.9 — 2020-06-20
- 1.0.8 — 2020-06-19
- 1.0.7 — 2020-06-18
- 1.0.6 — 2020-06-10
- 1.0.5 — 2020-06-10
- 1.0.4 — 2020-06-10
- 1.0.3 — 2020-06-09
- 1.0.2 — 2020-06-09
- 1.0.1 — 2020-06-09
- 1.0.0 — 2020-06-09

## README

# vue-cli-plugin-apmapi
A Vue CLI Plugin for apmApi config
[vue-cli version > 3]

## install & usage
```javascript
vue add apmapi
```

## config axios
```javascript
import axios from 'axios'
import { InitApm } from '@/plugins/apmApi'

function serves(serve: string) {
    const apm = new InitApm('app name'); // apm
    apm.apmInit(); // apm

    const service = axios.create({
        // config ...
    });

    // axios
    service.interceptors.request.use(
        (config) => {
            apm.ampHanleRequest(config); // apm
            return config;
        },
        (error) => {
            return Promise.reject(error)
        }
    );

    service.interceptors.response.use(
        (response) => {
            apm.apmHandleResponse(response); // apm
            return response;
        },
        (error) => {
            apm.apmHandleResponseError(error); // apm
            // handle error ...
        }
    )
    return service
}
export default serves
```

---
_Source: https://npm.io/package/vue-cli-plugin-apmapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
