Skip to content
← Back to Community
Replit.sh - Repl.it's Official URL Shortener
Profile icon
hacker
has Hacker Plan
piemadd

Replit.sh: Repl.it's Internal URL Shortener

Preface

If you follow @replit on Twitter, you may have realized some links showing up on our posts starting with the url replit.sh. I have been working on it for almost two weeks now and have decided it is ready for public use. It is currently on version 2.5.3 and version 3.0.0 should come out later this weekend with a lot of improvements (read versions.md for more info).

Notes:

  • This URL Shortener can only be run on Repl.it due to it using Repl.it DB.
  • Users are managed with Repl.it Auth, so keep that in mind.

Getting Setup

  1. Setting Up Your Repl
    1. Press the run on repl.it button below to clone the repository and install the packages:
      This file cannot be displayed: https://repl.it/badge/github/pieromqwerty/Replit.sh
    2. After running your repl, go to to line 11 in main.py and replace https://replit.sh/ with the url your repl is being served to.
    3. Replace Replit.sh on line 12 with the name of your site.
  2. Setting Up Your Users
    1. Rename sample.env to .env, as it will be where your user ids are stored.
    2. Head over to https://[Your URL]/getid, login with Repl.it, and then copy the user id you are given.
    3. Paste the URL into the array in your .env file.
      1. For example, if you are the only user and your id is 123456 then your .env file should look like [123456]. If you
      2. If you wanted to add your friend who has id 654321, your .env file would look like [123456,654321].
  3. Stop and Start the repl to complete your changes.

Features

  • Simple Login Through Repl.it:

Login with Repl.it

Login with Repl.it

  • Dashboard of all links for a user:

Dashboard

  • Easy to use home-page:

Homepage

  • Custom URLs:

Custom URLs

  • Editing URLs:

Editing URLs

  • Database I/O:

Database I/O

  • Deleting URLs:

Deleting URLs

Voters
Profile icon
SilvermoonCat
Profile icon
Polo1245Ofi
Profile icon
marcellll
Profile icon
LuckyOreos
Profile icon
jaydenlll
Profile icon
ch1ck3n
Profile icon
aww7
Profile icon
Nefomemes
Profile icon
CodingGoose
Profile icon
Vandesm14
Comments
hotnewtop
Profile icon
CoolCoderSJ

:O

I wish u connected this with Dupl Auth I cant use it on my iPad =(
only on my laptop (cause of safari, and my skool blocked other browsers on my iPad)

But really kool otherwise

Profile icon
piemadd

@CoolCoderSJ
I wanted to integrate with Repl.it as much as possible. Sadly repl auth doesn't work on safari because of apple.

Profile icon
CoolCoderSJ

@piemadd
yeah its fine, i just thought of it as a convenience, i still use my laptop more

Profile icon
piemadd

@CoolCoderSJ
Yee. In v3 im adding my own login system anyways so its chill

Profile icon
CoolCoderSJ

@piemadd
noice

Profile icon
xxpertHacker

Screenshot 2020-12-17 at 11.04.45 AM

Is that a bug, or is it intentional?

users = json.loads(os.getenv("IDS"))

Oh, okay, random blacklisting, cool.

Profile icon
piemadd

@xxpertHacker
Replit.sh only allows Replit staff lol. The instructions tell you how to deploy your own copy.

Profile icon
xxpertHacker

@piemadd
Oh, I'm blind; sorry for the accusation, my apologies.