Skip to content

Wsine/shorten-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shorten Link

It is self-hosted service for shortening link.

Motivation

Why self-hosted?

Self-hosted can get rid of the registration step so that we can also avoid the alias conflicting with those of other users.

How to avoid attacks without registration?

I used a very simple symmetric encryption to protect critical operations (i.e., just a string, lol).

Any more?

I don't need the tracking feature that most out-of-the-shelf services provide.

How to deploy

  • Clone this repository
  • New a project in Cloudflare Pages and link to the cloned repo
  • Set the environment variable AUTH_HEADER_VALUE as what you want

How to develop

# Clone this repository
git clone https://github.com/Wsine/shorten-link.git
cd shorten-link
# Install the dependencies
npm install
# Set environment variable
echo 'AUTH_HEADER_VALUE="c516aaea-1c27-4cec-ad9c-240ba1059396"' >> .dev.vars
# Bootstrap
npm run dev