Git Product home page Git Product logo

h2o-short-url's Introduction

Release

介绍

一款部署在多种平台,基于Python-Flask框架,开发的短网址程序.

需求

  1. 平台: Linux/Docker/Vercel/Deta.
  2. 语言: Python3.8+.
  3. 包: gunicorn,gevent,flask,flask_cors,flask_frozen,pymysql.
  4. 数据库: MySql.

配置(config.py)

进入文件查看.

部署

手动

  1. Linux: 执行gunicorn main:app -c gunicorn.py.
  2. 支持Docker.

自动

Vecel Deta
Vercel Deta

Vecel

  1. 首先点击部署的按钮,等待部署完成.
  2. 然后添加环境变量,DATABASE_HOST(数据库地址),DATABASE_PORT(数据库端口),DATABASE_USERNAME(数据库用户名),DATABASE_PASSWORD(数据库密码),DATABASE_NAME(数据库名称),DATABASE_TABLE_PREFIX(数据库表前缀,推荐使用h2o_short_url_),DATABASE_SSL_CA_PATH(启用),DATABASE_SSL_CA_PATH(CA路径),DATABASE_SSL_KEY_PATH(Key路径),DATABASE_SSL_CERT_PATH(Cert路径),三种证书路径无则空. 图像1
  3. 最后重新部署. 图像2

Deta

部署时填环境变量.

数据库

  1. core表修改网站标题,关键词,描述.
  2. domain表修改域名,protocol仅能填http/https.

问题

  1. 问: Vercel/Netlify自带的域名无法访问.
    答: Vercel/Netlify自带的域名被DNS污染,需要添加自定义域名.

h2o-short-url's People

Contributors

xiaoxinyo avatar

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.