Giter Site home page Giter Site logo

lil-link's Introduction

Lil Link

A shortlink system built on Cloudflare workers

Website - Hosted version coming soon

Live Demo

Before deploying you'll need to put your info into the zone_id, account_id, route, and [[kv-namespaces]] sections of wrangler.toml To deploy with Wrangler, you'll need at least version 1.2.0.

This requires 2 Workers KV Namespaces, mapped to SHORTLINKS and HITS. The shortlink is currently used as the key for both.

HITS currently doesn't display data anywhere but collects hit counts for future usage.

Namespace Key Value
SHORTLINKS shortlink url
HITS shortlink hit count

This version adds support for handling KV Namespaces via Wrangler.

Configuration and Deployment

  1. Run git clone https://github.com/eldridgea/lil-link
  2. Create 2 KV Namespaces in the Cloudflare Dashboard or via their API.
  3. Fill out the zone_id, account_id fields in wrangler.toml.
  4. Fill out the route section in wrangler.toml with https://example.com/*, replacing "example.com" with your domain.
  5. Paste one of your newly created KV Namespace IDs into wrangler.toml under SHORTLINKS and the other under HITS
  6. cd into the lil-link directory and run wrangler publish --release

Note: I have been unable to get Workers run unless there is already an active DNS record in the Cloudflare dashboard. I have an A record for @ on lillink.co pointing to a server I control, but as my route is set to https://lillink.co/* supposedly the server will never be contacted as Workers will intercept all requests.

lil-link's People

Contributors

eldridgea avatar

Watchers

 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.