This tool allows you to share a burst of urls as one link (bunch of supporting urls) as one link to teammates, friends, etc.
I was looking for an easier way to share supporting internet resources during my events with the MLSA and the ACC and came up with this. I got to exercise some upsides of using noSQL dbs, setup an IP
based rate limiting service and even introduced a faux implementation of Stripe's client level idempotency as seen here when I noticed duplicate and failed requests misbehaving. It turned into a learning opportunity.
I've run out of monthly azure credits so it's down for now but if you just want to run it locally, you can:
- setup mongodb
- configure env vars in
.env
- build (
docker build --tag urlplaylists .
) and run the docker image (docker run urlplaylists
)
-
Create playlists:
samplePOST
request to/
withContent-type
:application/json
. withidempotency-key
as a request header for subsequent requests{ "urls": ["smol.com", "uwu.com", "zyzz.com", "nattyboi.com"], "description": "a collection of internet slangs", "title": "Wannabe Zoomer" }
sample response:
{ "message": "playlist stored succesfully", "rand_slug": "123jdi34" }
-
Get playlistss:
make aGET
request to/<rand_slug>
replacing<rand_slug>
with an appropriate string like"123jdi34"
sample response:
{ "message": "playlist retrieved succesfully", "title": "Wannabe Zoomer", "description": "a collection of internet slangs", "urls": ["smol.com", "uwu.com", "zyzz.com", "nattyboi.com"], "" }
I think some bits here can be reused. I plan to:
- continue piling stuff on
- abstract the rate-limiting and idempotency middlewares into sole repos
create an issue and we can figure something out