1 Star 0 Fork 0

githubusercontent/sub-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

sub-web

基于 vue-cli 与 tindy2013/subconverter 后端实现的配置自动生成。

Table of Contents

ChangeLog

  • 20200730

    • 独立各类后端配置到 .env 文件中,现在修改后端只需要修改 .env 即可。

Docker

docker run -d -p 58080:80 --restart always --name subweb careywong/subweb:latest

若需要对代码进行修改,你需要在本地构建镜像并运行。 注:每次修改代码,你都需要重新执行 docker build 来执行打包操作。

docker build -t subweb-local:latest .

docker run -d -p 58080:80 --restart always --name subweb subweb-local:latest

Requirements

你需要安装 NodeYarn 来安装依赖与打包发布。你可以通过以下命令查看是否安装成功。 注:以下步骤为 Ubuntu 下相应命令,其他系统请自行修改。为了方便后来人解决问题,有问题请发 issue。

node -v
yarn -v

Install

yarn install

Usage

yarn serve

浏览器访问 http://localhost:8080/

Deploy

发布到线上环境,你需要安装依赖,执行以下打包命令,生成的 dist 目录即为发布目录。如需修改默认后端,请修改 src/views/Subconverter.vue 中 defaultBackend 配置项。

yarn build

你需要安装 nginx (或其他 web 服务器)并正确配置。以下为示例配置,你需要修改 example.com 为自己域名并配置正确的项目根路径(https 自行配置)。

server {
    listen 80;
    server_name example.com;

    root /var/www/http/sub-web/dist;
    index index.html index.htm;

    error_page 404 /index.html;

    gzip on; #开启gzip压缩
    gzip_min_length 1k; #设置对数据启用压缩的最少字节数
    gzip_buffers 4 16k;
    gzip_http_version 1.0;
    gzip_comp_level 6; #设置数据的压缩等级,等级为1-9,压缩比从小到大
    gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; #设置需要压缩的数据格式
    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";
    }
}

Related

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2020 CareyWang

MIT License Copyright (c) 2020 CareyWong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

sub-web 基于 vue-cli 与 tindy2013/subconverter 后端实现的配置自动生成。 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/githubusercontent/sub-web.git
git@gitee.com:githubusercontent/sub-web.git
githubusercontent
sub-web
sub-web
master

搜索帮助