技术:nodejs vue java mongodb springboot linux shell linux服务器监控项目,前后端分离vue+springboot+mongodb
使用命令:
并配置好环境变量
CD db-service-monitoring
npm install
npm run dev
在文件:db-service-monitoring\src\axios\axiosUrl.js /**
- 配置全局使用的请求地址url
- 11.24.201.68
- 192.168.0.5 */ export default { rootDirectory: function () { // 请求接口的根路径 return 'http://192.168.0.26:9999' },
修改访问地址和端口号: 打开文件db-service-monitoring\config\index.js
host: '192.168.0.26', // can be overwritten by process.env.HOST port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false,
DONE Compiled successfully in 16239ms 16:44:38
I Your application is running here: http://localhost:8083
A 配置文件中修改mongodb数据库连接 B 运行单元测试 初始化数据 service-monitoring\src\test\java\com\example\demo\DemoApplicationTests.java 手动打开mongodb新建一个集合 Collection('userEntity') 并新增一条用户: { "_id" : NumberLong(4), "userName" : "qiweb", "passWord" : "qiweb", "_class" : "com.example.demo.UserEntity" } C 运行启动类
com.example.DemoApplication
存放在linux-install-shell
cmd到db-service-monitoring执行 npm run build 得到dist就是编译后的前台系统文件
mvn clean package 获得一个war包