Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

feature request: short links #22

Open
trusktr opened this issue Nov 1, 2018 · 4 comments
Open

feature request: short links #22

trusktr opened this issue Nov 1, 2018 · 4 comments

Comments

@trusktr
Copy link

trusktr commented Nov 1, 2018

It'd be nice to have the option to request a short link at the click of a button (shorter than just the encoded value of the code).

Also a cool feature would be custom URLs, similar to like what http://bit.do does.

Even though these URLs are currently shorter than TypeScript's playground URLs, they are still to long for comments on StackOverflow.

@agentcooper
Copy link
Owner

@trusktr I don't really want to do a backend with storage for this one, do you maybe know any short link API that can be used for this?

@pengx17
Copy link

pengx17 commented Dec 21, 2018

One possible solution I can come up with is to use a free web service like Firebase as the storage.

@styfle
Copy link
Contributor

styfle commented Dec 21, 2018

You can avoid a database by using a static file. You might be able to use the GitHub API to dynamically update the file and kick off a build when it’s modified. Netlify has a way to handle redirects that I’m using here:

https://github.com/ceriously/go.ceriously.com

@Airblader
Copy link

I've used the approach of using Github APIs to trigger a PR and then a build & deploy on merge as a database replacement before as it gave me a UI for reviewing the changes out of the box too. I would not recommend using such an approach here — it's way too slow for an interaction where the user expects his shortened URL to work instantly. Not to mention that with higher usage frequencies this will quickly run into scaling issues as Github will for sure rate limit you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants