更新文档
This commit is contained in:
parent
7a89b28f3a
commit
5984b87647
38
README.md
38
README.md
@ -1,5 +1,37 @@
|
|||||||
# Vue 3 + TypeScript + Vite
|
# surl front
|
||||||
|
|
||||||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
短链接生成系统, 基于`Vue3`的前端
|
||||||
|
|
||||||
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
## 配置项
|
||||||
|
|
||||||
|
### 配置后端接口信息
|
||||||
|
|
||||||
|
配置`src/stores/siteconfig-store.js`中的两个变量
|
||||||
|
|
||||||
|
- `protocol` 协议,默认为`http`
|
||||||
|
- `host` 主机+端口号,默认为`localhost:18888`
|
||||||
|
|
||||||
|
## 部署
|
||||||
|
|
||||||
|
### 容器部署
|
||||||
|
|
||||||
|
1. 准备`docker`、`docker compose`环境
|
||||||
|
2. 按需修改 nginx.conf
|
||||||
|
运行 `docker compose up -d` 启动容器即可
|
||||||
|
|
||||||
|
### 本地部署
|
||||||
|
|
||||||
|
1. 安装依赖
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install nodejs npm nginx
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 配置nginx
|
||||||
|
|
||||||
|
- 按需修改`nginx.conf`,并复制到`/etc/nginx/sites-enabled/default`
|
||||||
|
- 运行`sudo nginx -t`检查配置
|
||||||
|
- 执行编译 `npm run build`
|
||||||
|
- 将`dist`下的内容复制到`/usr/share/nginx/html`
|
||||||
|
- 运行`sudo nginx -s reload`
|
||||||
|
Loading…
Reference in New Issue
Block a user