README.md 1.6 KB

Vue-dataAc-server

Vue-dataAc 后台服务 egg + mongodb

前端

仓库地址https://github.com/adminV/Vue-dataAc

安装

    npm install vue-dataac --save

Vue Cli

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

后端

源项目

git clone https://github.com/adminV/Vue-dataAc-server.git

nvm下载node14

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
nvm install 14
nvm use 14

安装依赖

npm install cnpm -g --registry=https://registry.npmmirror.com
cnpm install

安装mongodb

docker run -itd --name mongodb -p 27017:27017 mongo

启动与停止

npm start
npm stop

脚本使用

./VueDataAcServer.sh start|stop|status|restart

QuickStart

基于egg + mongodb 搭建日志分析系统

see [egg docs][egg] for more detail.

Development

$ npm i
$ npm run dev
$ open http://localhost:7001/

Deploy

$ 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 for more detail.

mongoDb

  1. sudo systemctl start mongod
  2. sudo systemctl stop mongod
  3. sudo systemctl daemon-reload

    https://mongodb.net.cn/manual/tutorial/install-mongodb-on-red-hat/