Skip to content
On this page

前端

一、安装

bash
npm i # 必须npm 安装,不可以使用cnpm
# 如果启动不了,安装一下插件
yarn add vue-cli-plugin-electron-builder -D --tilde

二、启动项目:

1、启动网页版

bash
npm run serve

2、启动客户端版

bash
npm run electron:serve

三、启动和私有化部署说明:

1、环境变量(启动和打包参数配置)

VUE_APP_publicPath='http://127.0.0.1:7001' // 部署API地址
VUE_APP_Electron=1  // 1是客户端  0 是插件

2、插件
将打包好的文件放在一下目录中

bash
根目录\e-api\e-api

启动白屏?请仔细按照第一、二步骤操作

3、环境变量
根目录下的.env.*文件

bash
# 接口地址
VUE_APP_publicPath='http://127.0.0.1:7000'
# 1是客户端  0 是插件
VUE_APP_Electron=0
# 更新版本
VUE_APP_Version='1.2.0'
# 更新时间
VUE_APP_UpdataTime='2023年02月'
# 官网
VUE_APP_Web='http://e-api.nodebook.top'
# 前端存储数据库版本
VUE_APP_Index_Version=1

服务端

邮箱配置

js
// config\config.default.js
// 邮箱配置
		email: {
			client: {
			host: 'smtp.qq.com',
			secureConnection: true,
			port: 465,
			auth: {
				user: '************@qq.com', // QQ 邮箱
				pass: '************' // QQ密钥
			}
			}
		}

数据库配置

js
// MongoDB数据库配置
        mongoose:{
            client: {
                url: 'mongodb://127.0.0.1:27217/cloud', // cloud(数据库)名称
                options: {
                    useUnifiedTopology: true
                },  // 其他配置项
            }
        },

启动和部署

开发启动

bash
# 初始化
npm install
# 启动项目
npm run dev

部署启动

bash
# 部署启动
npm run start
# 启动端口配置 9000为端口
"start": "egg-scripts start --port=9000  --daemon --title=egg-server-e-api-egg"

# 部署终止
npm run stop

欢迎光临我的网站