Coder Social home page Coder Social logo

link_url's Introduction

Short_url

短链接生成&解析主程序

FrameGitHub last commit

image.png

安装

本项目可直接使用Deta进行部署,可直接通过下方按钮将本项目配置到Deta。

Deploy

本项目默认解析当前域名为短链接域名,如果需要多链接选项如下图,则需要对index.html进行修改。

image.png

域名选择在74-81行处注释,根据选择显示相关链接的js在126、139行处和151-152行,在74行处取消注释并添加你的域名到value里,取消后面的三处注释,即可实现自定义域名。

如果想单独部署短链接跳转,可参考另一个repo,这个是单独的短链接解析,同样基于Deta。

注意事项

  1. 本项目使用了Deta Base作为数据库,由于Deta官方并未给出具体的字符串长度限制,本人亦未进行测试,因此不建议使用本项目存放长文本生成短链接,以免造成数据丢失。

  2. 如果想生成长效短链接,可以进入Deta后台,在Base里找到相应的储存项,将他的time改大即可,切勿修改up_time,因为定时清理失效链接的函数是用up_time进行的计算,大于当前时间时将会报错。 image.png

  3. 本项目的文本传送功能对于文本中的回车解析有问题(主要是Deta Base储存时不支持\n)后续将对此问题进行修改。 image.png

  4. 本项目没有短代码冲突检查,如果定义了两个重复的短代码将跳转至最新设置的Url。未自定义定义短代码时则会随机生成一个五个字符长的短代码。

link_url's People

Contributors

lord2333 avatar barrylp 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.