Coder Social home page Coder Social logo

dyaxy / yet-another-sub-web Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 10.0 534 KB

订阅转换前端,又一个 sub-web,基于 React、Next.JS 实现前端

Home Page: https://yet-another-sub-web.vercel.app

License: MIT License

CSS 0.57% TypeScript 88.00% JavaScript 1.03% Dockerfile 10.40%
nextjs react sub-web subconverter typescript

yet-another-sub-web's Introduction

yet-another-sub-web 又一个订阅转换前端

Website Vercel GitHub License

又一个 sub-web,基于 React、Next.JS 实现前端,需要搭配 tindy2013/subconverter 后端来实现订阅配置。

快速部署

使用 Vercel 服务

Deploy with Vercel

本地使用 Docker

  • Docker run方式部署
docker run -d -p 127.0.0.1:3000:3000 --name yet-another-sub-web --restart=always moefaq/yet-another-sub-web:latest -e NEXT_PUBLIC_SHORTURL=https://suo.yt/ -e NEXT_PUBLIC_BACKENDS=http://127.0.0.1:25500/sub?
# 替换后端或短链接服务
  • Docker compose方式部署
curl -LO https://raw.githubusercontent.com/DyAxy/yet-another-sub-web/master/docker-compose.yml
# 你可以修改 docker-compose.yml 中的 env
docker compose up -d

环境变量

NEXT_PUBLIC_SHORTURL NEXT_PUBLIC_BACKENDS
短链接服务,记得带 / 后端完整地址
https://suo.yt/ http://127.0.0.1:25500/sub?

常规部署

首先你需要 Node.js 环境

# Clone 库 并跳转至该文件夹
git clone https://github.com/DyAxy/yet-another-sub-web.git
cd yet-another-sub-web
# 当然你可以修改配置在 .env
# NEXT_PUBLIC_SHORTURL 为短链接服务
# NEXT_PUBLIC_BACKENDS 为后端,请使用|分隔
# 安装依赖环境并测试,你也可以使用yarn/pnpm/bun
npm i
npm run dev

浏览器打开 http://localhost:3000 来查看是否正常运行.

当一切就绪后,你可以打包构建运行它

npm run build
npm run start

此时打开 http://localhost:3000 即可正常使用。 需要常驻进程,可使用:screenpm2nohupsystemctl

可能你还需要反代,推荐使用 Caddy 轻量化反代,仅需加入到 CaddyFile 这些即可使用:

你的域名.com {
  encode gzip
  reverse_proxy 127.0.0.1:3000
}

静态导出

在常规部署 npm run dev 之后,测试没问题的情况下,修改文件:next.config.mjs,添加一行:nextConfig.output = 'export' 则会将html及其js文件静态导出至out文件夹,使用 Caddynginx 之类即可使用。

感谢

CareyWang/sub-web
CareyWang/MyUrls
tindy2013/subconverter

yet-another-sub-web's People

Contributors

dyaxy avatar dependabot[bot] avatar moefaq avatar

Stargazers

 avatar boring life avatar  avatar Narwhrl. avatar  avatar  avatar zxl hhyccc avatar Revee avatar pppfz avatar  avatar AndroidEnthusiast avatar  avatar yuju avatar 鬼鬼 avatar  avatar Jensfrank avatar Jaya avatar  avatar kissyouhunter avatar BESTRUI avatar 可乐是欧皇 avatar  avatar  avatar  avatar ZFXUE avatar Ling|陵云溪 avatar  avatar  avatar Yuiinar avatar Xinyu Moe avatar  avatar

Watchers

 avatar  avatar

yet-another-sub-web's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.