DOGAI

DOGAI

分享高质量GitHub开源项目,低价高质量服务器请看:https://www.vps567.com 香港CN2服务器 高防美国和大陆服务器 还有全球CDN加速。

Open Source Short URL Application [Sink]: Runs 100% on CloudFlare

Sink is a simple/fast/safe link shortener that runs 100% on Cloudflare. The core problem this project mainly addresses is compressing long links to the minimum length and provides the following features and advantages:

  • URL shortening: Compress your URL to the minimum length.
  • Analytical statistics: Monitor link analytics and gather insightful statistics.
  • Serverless deployment: Deploy without traditional servers.
  • Customizable Slug: Supports personalized Slugs.
  • AI Slug: Generates Slugs using artificial intelligence.
  • Link expiration time settings.

Screenshot Preview:#

DEMO#

Official Demo: https://sink.cool/dashboard (Site Token: SinkCool)

6f718fce174facaa06617178669a4fb8

Analytics Interface#

b6b5130ed8331e11c28d76d61c82306f

572543a94743c3261a2d45222ad37834

Setup Tutorial:#

First, we need accounts on GitHub and Cloudflare, then fork the project to your own repository.

GitHub address: https://github.com/ccbikai/Sink If you want to set up a server, I recommend Wu Liu Qi Cloud: https://www.vps567.com Hong Kong 2H2G5M server 20/month, and high-defense CDN acceleration starts at only 18/month.

Create an application in Cloudflare under Workers and Pages:

7232e3451dab5f0f6b8f100be4cdb508

4f87b4f9a31af8fab652860b0aef63b1

Select Nuxt.js as the framework preset, make sure not to select next.js by mistake.

64526b95ec952372a7fa0c649bc04908

Configure environment variables:

ee6a4b57a2b624d4ee13cd2772f76986

There are three variables that need to be configured:

  • NUXT_SITE_TOKEN: The password to access the project after launch.
  • NUXT_CF_ACCOUNT_ID: The CF account ID.

e789bb36d7524971e19d4878e95d3270

NUXT_CF_API_TOKEN account token.

c6f2640596ac103aba93981e3ccf48f1

15bc49c1ca13ddc231f780399f2fe749

Select Account. Account Analytics. If your interface is in Chinese, you can change the language in the upper right corner to English for easier selection.

625b9e7385fe4fafd2636692b78029ac

Save and Deploy#

However, the deployment at this point may fail, and you need to go back to the CF page settings to select Functions and then configure.

KV namespace binding:

5dd1c32ff0e001eda9c5733a0ef93d20

If your KV does not have a namespace yet, you can create one here.

94d3c83e170c3d9d4da7f2237c354875

Bind Workers AI and Analytics Engine, variable name: ANALYTICS dataset: sink.

716bcf7f9d247b3bff55ac8a08ac55d3

Go back to the deployment interface and redeploy to complete the setup.

ff916a1e7512770467e60337fda2a7e2

Finally, you can bind a domain name that has been hosted on Cloudflare or use the assigned domain name to access it.

Text tutorial source: https://runnable.run/docs/devops/Cloudflare/wan-zhuan-cf-zhi-bu-shu-duan-lian-jie-sheng-cheng-qi-sink/

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.