short
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A URL shortener in Val Town! This turns URLs into strings like
https://tmcw-short.express.val.run/JK
Which, well - it's not that short 🤣 but it's a start! It's pretty simple! In this case the storage is a private val because it contains some URLs. Part of the magic here is the venerable hashids module, which produces non-sequential string identifiers from an underlying serial numeric ID. So instead of huge UUIDs or fixed-length IDs like nanoid
would generate, this generates short IDs, at least initially - like the example above, which is just "JK".
Migrated from folder: Short_URLs/short