Share your repls and programming experiences

← Back to all posts
Cactus URLs
h
CodingCactus (3030)

Hi!!!

Continuing down my journey of flasky stuff, here is a nice and simple url shortener/disguiser thingy.

Example: https://url.codingcactus.codes/3

Have fun, hasn't been tested much so please tell me about all the bugs there will be

Thanks, have a nice day

Commentshotnewtop
dabs364 (274)

ERROR
"No Module Named replitdb"

CodingCactus (3030)

@dabs364 hrmm odd, looking into it

CodingCactus (3030)

@dabs364 should be fixed, dunno what happened there

JosephSanthosh (1183)

Can I ask you a really dumb question? How do you use the files thingy on the left. I've never used it before, like you can put an '.md' file but what others can you put?

Sry abt this btw!

CodingCactus (3030)

@JosephSanthosh erm you can put your files there

VivaanSa (27)

@JosephSanthosh you can put .htm, .html, .xht, .xhtml, .xml, .js, .md, .py, and a b u n c h m o r e

CodingCactus (3030)

@JosephSanthosh ERM have you read it? It is pretty pointless but basically, you give it a URL and it gives you a URL that you can use to get the URL that you input

ZDev1 (641)

I suggest make another input that manages the slug
not a random slug
I can use it with nodejs, it named slugify

ZDev1 (641)

@CodingCactus you don't know what is the slug?

ZDev1 (641)

@CodingCactus slug is those:

things in the url, like https://url.codingcactus.codes/3 so 3 is the slug!

CodingCactus (3030)

@ZDev1 ok, so with regards to the original comment, it is not a random 'slug'

ZDev1 (641)

@CodingCactus yes we need to make a new input to let the user to choose his slug

ZDev1 (641)

@CodingCactus but the problem is I don't know flask a lot

CodingCactus (3030)

@ZDev1 why should they be able to choose their own? things like tinyurl.com don't.

ZDev1 (641)

@CodingCactus ok that's your opinion!
I just gave you an opinion ;)

[deleted]

@ZDev1 it's a url shortener, its already longer than many urls like this, it will be longer than 99% of all urls if he does that

[deleted]

@HarperframeInc i know this url

BlueAsteroid (0)

None of my URLs work it just says that it refused to connect

CodingCactus (3030)

@BlueAsteroid sounds like an issue with you?

BlueAsteroid (0)

@CodingCactus Never mind i got it to work, my Wi-Fi was just really bad

hg0428 (169)

Traceback (most recent call last):
File "main.py", line 1, in <module>
import flask, requests, replitdb
ModuleNotFoundError: No module named 'replitdb'

CodingCactus (3030)

@hg0428 should be fixed, dunno what happened

nahu (26)

Nice it works for my repl urls

HahaYes (1213)

@CodingCactus Mr.Cactus I don't use Python(though I prob should) how do you implement flask? also, is your codingcactus domain hosted by you?

HahaYes (1213)

@CodingCactus how do you host your own domain? frontend noob, backend pro.

CodingCactus (3030)

@HahaYes just get a domain and link it

JosephSanthosh (1183)

This is quite strange, honestly.

CodingCactus (3030)

@JosephSanthosh erm why? When you have random comments like you do can you please explain them

k9chelsea2 (653)

theres an error on line one, theres no module name 'replitdb" idk lol

adl212 (127)

@NDLFOREVER You have to add replitdb in the packages tab.

CodingCactus (3030)

@NDLFOREVER well you shouldn't really be running it, just go to the website

k9chelsea2 (653)

well the error still comes up (which might be interfering with the backend stuff) but the wbsite kinda works I mean all i get is invalid urls :( lol

CodingCactus (3030)

@NDLFOREVER hrmmm well the server isn't going offline so it should be working, you shouldn't be running the repl.
If you are getting invalid url, then that means you aren't entering a real url