# yz-cvr

> CVR后台管理系统

Latest version **2.4.6** (published 2020-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install yz-cvr
pnpm add yz-cvr
yarn add yz-cvr
bun add yz-cvr
```

## 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 | 2.4.6 |
| Published | 2020-04-29 |
| First published | 2020-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 126 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | 上海眼值信息科技有限公司 |
| Maintainers | alterhu2020 |

## Links

- npm: https://www.npmjs.com/package/yz-cvr
- npm.io page: https://npm.io/package/yz-cvr

## Dependencies (19)

- [nuxt](https://npm.io/package/nuxt.md) ^2.12.2
- [dayjs](https://npm.io/package/dayjs.md) ^1.8.25
- [echarts](https://npm.io/package/echarts.md) ^4.7.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.0.0
- [secure-ls](https://npm.io/package/secure-ls.md) ^1.2.6
- [echarts-gl](https://npm.io/package/echarts-gl.md) ^1.1.1
- [element-ui](https://npm.io/package/element-ui.md) ^2.13.1
- [screenfull](https://npm.io/package/screenfull.md) 4.2.0
- [animate.css](https://npm.io/package/animate.css.md) ^3.7.2
- [html2canvas](https://npm.io/package/html2canvas.md) ^1.0.0-rc.5
- [vue-echarts](https://npm.io/package/vue-echarts.md) ^5.0.0-beta.0
- [@nuxtjs/axios](https://npm.io/package/@nuxtjs/axios.md) ^5.10.2
- [normalize.css](https://npm.io/package/normalize.css.md) ^8.0.1
- [nuxt-purgecss](https://npm.io/package/nuxt-purgecss.md) ^1.0.0
- [@nuxtjs/device](https://npm.io/package/@nuxtjs/device.md) ^1.2.7
- [@nuxtjs/sitemap](https://npm.io/package/@nuxtjs/sitemap.md) ^2.2.1
- [vue-quill-editor](https://npm.io/package/vue-quill-editor.md) ^3.0.6
- [vuex-persistedstate](https://npm.io/package/vuex-persistedstate.md) ^3.0.1
- [@nuxtjs/google-tag-manager](https://npm.io/package/@nuxtjs/google-tag-manager.md) ^2.3.2

## Recent versions

- 2.4.6 (latest) — 2020-04-29
- 2.4.5 — 2020-04-29

## README

# console.cvr.yitieyilu.com

## 环境配置

- 下载`node`,并执行命令安装node配置`PATH`路径:

```$shell
$ cat /proc/cpuinfo 
Processor       : ARMv7 Processor rev 10 (v7l)
ARMv7 (and below) is 32-bit. ARMv8 introduces the 64-bit instruction set.
If you want to see whether your system supports 64-bit binaries, check the kernel architecture:
$ uname -m
$ wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz
$ tar xvf node-v10.16.3-linux-x64.tar.xz
$ mv node-v10.16.3-linux-x64 /opt/
$ sudo vi /etc/profile
增加对应的node的PATH路径,例如如下:
export path ="/opt/node-v10.16.3-linux-x64/bin:$PATH"

执行如下命令使上面的PATH配置生效
$ source /etc/profile 

执行如下命令确认node环境变量配置成功
$ node -v
$ npm -v 

设置npm和yarn的镜像为淘宝镜像
$ npm config set registry https://registry.npm.taobao.org
```

- 安装node的包管理器`yarn`(当然此处也可以不安装,直接使用node内置的`npm`来管理包):

```$shell
$ npm i yarn -g
$ yarn config set registry https://registry.npm.taobao.org
```

- 安装`pm2`命令用于后台服务静默执行:

```$shell
$ npm i pm2 -g

配置pm2开机启动脚本
$ pm2 startup 
```

## 1. 测试环境运行调试

``` bash
# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate
```

## 2. 生产环境项目部署

- 复制当前所有包文件,解压,然后在当前文件夹下执行命令安装编译工程:

```$shell
$ yarn 
$ yarn build

编译程序, 然后配置pm2程序
$ pm2 start  ecosystem.config.js --watch
$ pm2 save
```

## 3. 重新发布/新版发布

```$shell
# 首先复制源码目录文件到对应的服务器,然后直接如下命令:
$ yarn build
$ pm2 reload name| all
$ pm2 logs
```

- 执行pm2相关命令确认程序启动没有问题:

```shell script
$ pm2 list    # 查看所有的pm2程序
$ pm2 monit   # 查看pm2的所有程序的监控面板
$ pm2 reload
```

如果上述配置都没有问题,可以访问地址: `http://127.0.0.0:3000`查看启动程序,然后我们只需要在nginx配置
将所有请求反转到`nginx`,参考配置如下:

```
 # proxy for  project
 location  / {
          alias   /www/the project folder/;
          proxy_pass http://127.0.0.1:3000/;
          
          proxy_http_version      1.1;
          proxy_cache_bypass      $http_upgrade;
          
          proxy_set_header Upgrade                        $http_upgrade;
          proxy_set_header Connection             "upgrade";
          proxy_set_header Host                           $host;
          proxy_set_header X-Real-IP                      $remote_addr;
          proxy_set_header X-Forwarded-For        $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto      $scheme;
          proxy_set_header X-Forwarded-Host       $host;
          proxy_set_header X-Forwarded-Port       $server_port;

 }
```

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