# Vue-dataAc-server Vue-dataAc 后台服务 egg + mongodb ## 前端 仓库地址https://github.com/adminV/Vue-dataAc **安装** ```shell npm install vue-dataac --save ``` **Vue Cli** ```Js import Vue from 'vue' import VueDataAc from 'vue-dataac' Vue.use(VueDataAc, { openReducer: true, useImgSend: false, openVueErr: true, postUrl: 'http://localhost:7001/push';//替换为服务部署地址 }); Vue.config.warnHandler = Vue.config.errorHandler ``` ## 后端 **源项目** ```shell git clone https://github.com/adminV/Vue-dataAc-server.git ``` **nvm下载node14** ```shell curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash nvm install 14 nvm use 14 ``` **安装依赖** ```shell npm install cnpm -g --registry=https://registry.npmmirror.com cnpm install ``` **安装mongodb** ```shell docker run -itd --name mongodb -p 27017:27017 mongo ``` **启动与停止** ```shell npm start npm stop ``` **脚本使用** ```shell ./VueDataAcServer.sh start|stop|status|restart ``` --- ## QuickStart 基于egg + mongodb 搭建日志分析系统 see [egg docs][egg] for more detail. ### Development ```bash $ npm i $ npm run dev $ open http://localhost:7001/ ``` ### Deploy ```bash $ npm start $ npm stop ``` ### npm scripts - Use `npm run lint` to check code style. - Use `npm test` to run unit test. - Use `npm run autod` to auto detect dependencies upgrade, see [autod](https://www.npmjs.com/package/autod) for more detail. ### mongoDb 0. sudo systemctl start mongod 1. sudo systemctl stop mongod 2. sudo systemctl daemon-reload https://mongodb.net.cn/manual/tutorial/install-mongodb-on-red-hat/