You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.5 KiB

4 years ago
# sub-web
4 years ago
> 基于 vue-cli 与 [subconverter](https://github.com/tindy2013/subconverter) 后端实现的订阅转换。
4 years ago
4 years ago
## 环境要求
4 years ago
4 years ago
需要 [Node](https://nodejs.org/zh-cn/) 与 [Yarn](https://legacy.yarnpkg.com/en/docs/install) 来安装依赖与打包发布,可以通过以下命令查看是否安装成功。
4 years ago
```shell
4 years ago
node -v
yarn -v
```
4 years ago
## 安装
4 years ago
```shell
4 years ago
yarn install
```
4 years ago
## 使用
4 years ago
```shell
4 years ago
yarn serve
```
浏览器访问 <http://localhost:8080/>
4 years ago
4 years ago
## 发布
4 years ago
4 years ago
执行以下打包命令,生成的 dist 目录即为发布目录。
4 years ago
```shell
4 years ago
yarn build
```
4 years ago
你需要安装 nginx (或其他 web 服务器)并正确配置,以下为示例配置:
4 years ago
```shell
4 years ago
server {
listen 80;
4 years ago
server_name sub.343.re;
return 301 https://$server_name$request_uri;
}
4 years ago
4 years ago
server {
listen 443 ssl http2;
server_name sub.343.re;
ssl_certificate /etc/ssl/certs/343.re/fullchain.pem;
ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem;
root /var/www/sub-web/dist;
index index.html;
4 years ago
error_page 404 /index.html;
4 years ago
gzip on;
gzip_min_length 1k;
4 years ago
gzip_buffers 4 16k;
gzip_http_version 1.0;
4 years ago
gzip_comp_level 6;
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
4 years ago
gzip_vary on;
location ~* \.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff)$ {
access_log off;
add_header Cache-Control "public,max-age=30*24*3600";
}
}
4 years ago
```
4 years ago
## 许可证
4 years ago
4 years ago
MIT © 2021 Dnomd343 (fork from CareyWang)