Build and deploy a URL Shortener in 3133.7 seconds with Node.js + Express + MongoDB + Heroku

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
oh right welcome everyone to a coding challenge where I will attempt to create a URL shortener in 3133 2.7 seconds maximum you see the countdown timer here we're already wasting time so we gotta go right now I have a blank project I'm gonna create a folder for my server and I'm gonna do I'm gonna do a client server we're basically the client is gonna be a static app the server is going to be a node jsapi that's about all we're gonna do it's gonna be fine no I don't want to file a new folder for the client but first we're just gonna get the API up and going so let's create a new file yeah go do it to our terminal into the server folder we're gonna init this it's an NPM project we are going to use Express and we're also going to use yep for validation we're gonna use monk to talk to our database is what I've decided we also want helmet basic security will use Morgan for logging of course that's about it and while that's going we could so I think for the for the front-end I'm actually just gonna do a very very basic what has happened here I don't know what I just did doesn't can anyone help me what do they do in vs code why why can't I see my stuff how did this happen all right we're gonna close the vs code and we're gonna open it back up I put the guest code in focus mode okay we'll have a basic front-end and I think we're gonna use I think we'll use view j/s but we'll we'll do it without the without the CLI we're just gonna have a basic front-end app that pulls in view from a CDN and we'll have like a basic basic view app okay all right we got our server we need our index let's go let's bring it Express in all our middlewares I mean technically it would have saved me so much time if I just use like a generator or something like that but oh well that's fine we need cores what else do we need view is for the cool kids JavaScript what else do we need we need Morgan which is that other middleware that we brought in we also brought in wait isn't Morgan the riping I think it is we also running helmet I mean helmet helmet yep Morgan is a logger yes it is okay so we need our app this gives us an express app great now we got to use all our middlewares so we'll say let's use a helmet we're going to use Morgan Morgan is a logger and I like to use let's go with the the tiny logs it'll say like what the request was how long did it take all that good stuff and then we'll also use cores default is going to be star so anyone can request this API and basically anybody could build a front-end that talks to this API so that's fine and then we'll set up our body parser so we'll just do Express JSON we're only accepting JSON data we do not accept form data and then we'll just do one basic get route when you get the slash route we need to respond and we'll just say resume some message is I forgot to tell you that we're calling this being CD gsh short urls for your code garden there we go so that's how we'll respond will then listen on some port and we'll log to the console when that happens so let's lock listening at HTTP colon slash slash localhost and then that port what is that port well rapport is process env court or we need something well we'll do 137 that's that's how long we are timer is okay so and Thank You Jordan with the Ray welcome everyone we are in the middle of a challenge welcome welcome welcome and as you can see I can barely see your chat messages we're in focus mode I have 47 minutes left to implement a URL shortener and right now we just have a basic Express app okay so we got a port we're listening um I think we're ready so before we do this I'm going to install and dot E and V as a dev dependency note that's in the wrong spot I did the wrong thing I need to put it in the server folder it scared of the package lock in the server folder we're going to install dot env and then I need to set up my package JSON to have some scripts so start is just going to be node index that guess and then dev will use node Bond yeah but welcome Raiders I'm sorry I can't see your messages but just know that I appreciate you thanks for being here uh yeah it should be good should be good all right empty and run dev will it work no no it will not what did I do oh no daman come on command not found is it in my package JSON I just installed the wrong thing what did I just installed oh I installed dot E and V I guess we're gonna need that too but we need node Mon as well now that we have node Mon is it gonna work great it works all right we're gonna bring up insomnia and we're just going to hit some endpoints make sure that it works we can create a new folder we'll call this C D G SH will add a new request just call it the route request HTTP colon slash slash localhost port 1337 it works we have an API okay so how is this how is this API going to work I mean hmm there are a lot of things we can do right I think in this in the simplest terms oh actually this can't be a separate client and server because we need to redirect based on the URL okay nevermind we'll get there set up DNS so it propagates in time uh yeah so I think I'll go ahead do that let's go ahead an get this thing deployed but here's the thing I've scrapped the idea of a separate client and server we're now going to have a public folder and we're gonna serve serve well we kind of need I do have a number at the end of the street um let me I have to think about the design here I'm serving a 302 wait what because when someone makes a request to like really anything we need to redirect that that request time is up time is not up so actually that's not so bad because this could just do a a res de res dot redirect oh yeah or some slash some ID you're right because it needs to be alphanumeric character characters valid characters I think we're just gonna use and we have a library called Monk that'll let us talk to to do redirect to URL let's go ahead and write out our routes slash post to URL to do create a short URL technically we could also do slash get /url slash ID and that would allow you to retrieve information about the short URL just like from the API itself that's fine and then now we actually need to set this up with a static serve so let's do F dot use Express that static will pull in the public folder like that so this has a public folder I mean I probably should use server-side rendering some sort of templating thing I don't I don't know I really don't know I'm lost line 15 to do is wrong what okay I'll fix it to do line 15 get a short URL by ID redirect to a URL create a short URL cool get slash long domain could work as a generate fight I don't I don't like that I don't like get requests that do things why can't I use server client here because I want the I want the root request here too I still can but it needs to be hosted on the same server because the root request will potentially be a redirect yeah mm-hmm the church overlay is transparent because we're in focus mode right now see you later toxic toast okay okay okay okay that looks good let's go ahead and setup a basic HTML page h1 CDG SH short URLs for your code garden should we use bootstrap it's gonna be so easy if we use bootstrap we're not gonna use bootstrap we're gonna make our own stylist okay so we need some styles material you I know so let's say everything boma conrad we no no no I don't need any designs we're just gonna make this happen as we go so everything has box-sizing a border box has margin:0 and padding:0 this is our rudimentary reset and then our body has a font family sans-serif if somebody could pick out a font for me that would be nice we're not gonna use tailwind this is it this is really all that we need we're gonna say that that oh and actually we'll put the h1 inside of a header papyrus doc you stop it Comic Sans um can I do serve a rendered view I probably could have but I haven't done that before so we're gonna do what I know it's not gonna be pretty yeah yeah the header the h1 inside of the header should have some margin of one rim all right save this this is now serving public so we're not gonna use insomnia for that but if we go to localhost one 337 CDG SH short URLs for your coat garden great huh let's Center that text text align Center for Dania well thank you did you pretty good it's pretty good we're gonna I strongly suggest your tech I like share tech it's what I use on all the coding garden stuff okay we have a basic site let's go ahead and deploy it so that way we can get all the dns to resolve and it will be ready to go in 39 minutes and for now I'm going to comment out these they won't adjust our deployment okay so technically we could do we could do versal in the right way and set these all up as serverless functions but I don't I don't do that basically I use a custom build for versal or what used to be now that wraps my Express app and turns it into a service function so that's what we're gonna do entry point index specify an alias yes see eg Sh alright so if we look at what got generated the source is index yeah we're gonna put all of our code in that one file it's gonna be great it's gonna be great and we don't need a name for this alright let's deploy it YouTube yeah we're gonna deploy this now do I want to link it no link it to an existing project no the project's name is C D G - SH the product the code is here uploading builds might be deprecated I don't know I'm not staying up to date on all this stuff this should work though I've deployed apps like this before yeah there's some questionings happening production cannot get / take it what happened change the stream title you cannot host nerd snowed servers like this alright well that's the case we're just gonna use Heroku we're gonna delete this we're gonna forget that we ever tried to do that we have 37 minutes I'm gonna be able to do it right take the time we get all the time all the time of the world yeah they've removed them well there goes a good thing so let's use Heroku instead give me a second I'm gonna log into Heroku and we'll get that going you got this although with Heroku can you do custom domains with SSO you can't on the free plan we need to deploy this CD gsh we literally bought this domain before the raid happened we literally bought the domain so that I can make it make it happen Heroku is almost like cheating using grok no way we're gonna put it on Heroku as long as it's serverless no we're gonna create a Heroku app and I'm gonna pay for the SSL put a domain on it net liffe i know it's that stop stop it AWS I mean I have my own syrup I can put it on the coating garden server I could but I want like a cheap and easy deploy that's repeatable let's see firebase I need a back in I need something someplace that can host nodejs but actually I can show you this stuff yeah I don't need to hide my screen anymore 35 minutes left are we gonna I think we can get something done I'm gonna get in it so that the way that Heroku works is it works off of get remotes so that added a remote called Heroku and then if I do get push Heroku master that deploys it that deploys it to Heroku so that should be fine and then I can also add resources here so we want a we want it like a we want an in lab hot tip if you want to use em lab you can't sign up on em lab anymore but if you go through Heroku you actually can't create an in lab instance in lab yeah so we've got ourselves a MongoDB in the cloud that's great I need to add a domain CD gsh DNS target this is what I'm gonna need to update on Namecheap configure SSO upgrade to pay dinos to configure Roku SSL automatic certificate management item can created hobby or above to your required okay yeah yeah yeah okay but the deploy is done so if we go here that's what I want to see all right see we're on Heroku it's great it's great and I'm gonna go ahead and pay the money so that I can get SSL on here that's just what I got to do seven dollars a month it's fine okay we got the $7 Dino and now we can configure your certificate is automatically managed automatic great and then I need to go to Namecheap and update my dns entry yeah I just paid seven I mean the thing is I want this to be quick and easy I want to actually get it done and not not have to worry about like server list configuration and all this like I just want to get it done we bought a domain for $30 and a deployed thing for seven okay DNS target okay I'll show you what I'm doing so on Heroku it says my DNS target is this thing so I'm going to copy that and then over here on the domain settings on Namecheap I need to update the at to be a probably a cname that's pointed here and the time to live we're gonna make it super small one minute that's how often the cache updates and right now because I'm just like I want to get it working we're doing that and then I'm gonna do a URL redirect records so if they go to dub dub dub CD gsh it just redirects to HTTP colon slash slash CDG that Sh okay the dns propagation will take longer than time limit we can only hope we've got the TTL set up we've got that refresh ACM status one domain validation failed incorrect D innocent okay so we're just gonna have to wait we're gonna try our best dub dub dub we're going to try our best and we just wait and hopefully it will all work okay to our best so now we play the waiting game but locally we'll get this app working and then when we're ready we'll just we'll just click deploy and it'll be ready to go it'll be done awesome now let's actually get the stuff going it will work so I want to first be able to create I want to create short URLs okay so we're going to do that and I think I installed yup which is a schema validation yeah we have yep so we're gonna create a schema for what a short URL needs let's bring in yep and then we need our schema so I'm gonna say tima equals yep dot shape no object dot shape then we pass it in what it needs so a short URL needs a alias which is optional but it will be a string and it can't be an empty string but it's not required so technically you can create a short URL with a custom what's the word a custom slug actually let's call it slug I like that let's look but this also must match the regular expression so this can only be any character a through Z or underscore paste insensitive right dashes dashes - is that the right regex let me know and then we need the URL oh yeah numeric - let's do numeric and then the URL can do yep dot string can't be empty and then it must be a URL so yep will automatically validate yep will automatically validate that it has like HTTP and all that good stuff though actually we can I believe we can pass in some options - URL to say like we only support the HTTP protocol escape the - thank you question mark and and you cannot have that in your in your slug and then this is the URL is required yeah it's great so /w or spaces yeah yeah okay anything else slug URL slug should also be required if none provided oh yeah that's that's the thing so if you don't provide a slug wait so it's not required but if you pass it in it must match this but if you don't pass it in we're gonna randomly generate one and I think for that we could probably just use nano ID URL friendly unique string ID generator look they look like YouTube URLs this is great let's just install this I've used this before so I'm okay with installing it so that's gonna give us a unique ID URL use count yeah the database will store all of that but this is really just the schema for whenever we're inserting a new a new shortened URL that's the plan there so let's do it so I'll say we grab the slug and we grab the URL from the body and we'll say do a try-catch so we can set up an error handler so if a schema no no will do this a weight schema dot and URL and we'll say if there is no slug then slug equals a new nano ID how does a nano ID work do you just invoke it yeah you just invoke it so we installed it let's bring it in should be slugs should be case-insensitive for security right so when we do the database lookup we're gonna we're gonna do it to lowercased yeah I like that no this function needs to be async yeah like there's no there's no getting around that if I'm using a weight it has to be async yeah and we want yeah so it has to be casing so I like I like what you're saying doc okay so if they didn't have a slug we're gonna generate a slug and we're going to to lowercase it and actually we'll just do this so if they didn't have one we generate it and then we will say slug equals slug to lowercase and actually I guess I'm gonna validate it first because that's gonna validate that slug is actually a string and it'll break out before we do that so just gonna respond with the slug in the URL if it was valid otherwise we throw an error so I'll just say next with that error so let's go in next here and then we need our error handler so let's just do app dot use air or req res and Nexo and express the error handler has four params and we'll just do resinase on with the message is error message and we can pass back the stack trace so if process C and V no D and V is equal to production then we send back a pancake stack like that otherwise we send back the error stack cool if the error has a status code then we're gonna use that we'll say red spot status is her dot status great it should be good and so here we can say it'll be a 500 code 500 easy okay now we want to try creating the URL let's see what happens so here we're gonna try to make a post request against URL the body is going to be JSON and let's see if I specified nothing in the body what happens could not connect to server well now start it up unexpected token that should be a comma 25 minutes we got this easy okay [Music] empty body URL is a required field so URL HTTP colon slash slash coding garden Nano ID is not a function great but will the dns propagate I don't know I think that's the one crux of this whole thing is is our DNS actually going to propagate okay so an oid did I spell it wrong nano ID how does this work tools oh you have to you have to D structure it okay I can do that and then also you can pass in the length let's if they didn't do it then we're gonna default to a I don't know if everything yeah so I D structure it if everything is lowercase and we do five random characters how many possible URLs are there I think this is a fine we'll increase that number when our database gets too big okay so 36 to the fifth power can you do that math for me assignment to a constant variable so actually need to do just fine there we go even it B n xq o J to do M nish mo ah wait wait that's that's in the millions 30 yeah yeah yeah we're gonna that's plenty of options all right so it's working all right but if I pass in a slug a slug is OG it comes back as OG great okay so that's great now let's put it in our database so I am 60 million 60 million short URLs well I think I have running locally yeah I have running locally so we're just gonna use that we could set up a docker container but is running on my machine we're just gonna use that I'm going to pull on this library called monk so monk is a library for talking to databases and we can create a DB connection like this DB equals month DB equals monk and then you pass in the URL so I do process that env dot you are I and then while we're here we need to bring in Dottie and B as well so we'll require in Dottie and B and then we'll pick it like that and then we actually need a Dottie and B so right now we'll create a dot env file and then the URI is I think your localhost / c DG Sh there we go so that'll connect to the DB and then we need a connection or we need a collection sorry so we'll say URLs is dbgap URLs and then we'll also do I think I need you like create index the index we want is we want to index them on their and their name like that because we want to be able to look them up by name cool okay so remove the special characters or it will make a mess what are you talking about for special characters don't know what you mean I don't know what you mean I'm gonna keep going so at this point instead of just responding will actually put it in the database well before that we need to double check that the slug is not in use so it's that's fine and actually I think another thing I'm gonna do is I'm gonna generate a secret that you can use to update it do we want to allow them updating yeah you can update it okay so secret is gonna be another nano ID of length 10 to lowercase updating sounds like a security risk all right so the new URL we're about to insert has this URL this slug and the secret and then we can store like clicks I don't know I mean should we put it in the same no no we're not gonna keep track of that it just does redirects that's fine and then you have to use that secret to be able to update it we probably should check and make sure that this slug is not in use docker is great on oh s X as far as I'm concern to say URLs that find one find one where the slug is that slug and if existing is a thing and we're going to throw a new error slug in use we have a slug emoji we have a hamburger that works cool chew chew chew chew chew and if we generated a nano ID how can we be sure that there are no no collisions I don't think we can but that's okay URL equals a safe address discord link checker says safe euro has been updated to an email address oh okay we won't allow updating I know I could regenerate a new one but then I would have to like check my database I don't know it's it's hard it's hard okay all right so you cannot update it once it's created it's created so we'll say created is oh wait URLs insert the new URL that should respond and then we're gonna res days on with that created like that right what can go wrong there we go so it got he got generated and now if I try to create it again it should say slug is in use nice nice while existing true that would be way too bad so now I can just generate random ones all day those are getting put into my database so that's great we can create URLs now oh we can do we could do unique yes how do I say that let I think that would be good because then we could get a database error on insertion I like that let's look at the monk Docs 17 minutes 17 minutes we got this documentation um where are we ID create index create index whoot unique true all right let's do this urls dot create index so I do you name like that unique true so now now that I do that index with name name one already exists with different options that's fine let's just drop the database give me a second um we know we get we got we got work to do yeah we got work to do CDG is working but it's not forcing HTTP that's good it's good to know all right yeah let's just delete this database drop database well sure I can show this I can show this so it created the index I mean technically we could delete the index I'm just gonna drop the database so we're gonna start over so kill it restart it that now creates a name and actually with this I think I can just remove my code that double checks to make sure that the slug is in use well let's do this there's gonna comment it out I don't think I need it now because now that we have the unique index it's the database should throw an error for us so let's try it so I'm gonna create one where the slug is OG try again duplicate care collection that's great so we're gonna just catch that error so if error message that starts with that yay for TV integrity aired up message equals slug in use hamburger slug in use great I could make it a while loop but I really don't want to I really don't like cuz it that's even worse wait why is the slug always in use we should be generating a nano ID LX z w2 wait I did that index wrong oh man we only have 14 minutes um needs dark mode wait do we actually have a design all right we're just gonna go back to what I this wasn't this was a nice try yeah we're this was a nice try but we got work to do we got to redirect the URLs and we have to make a front-end so we're gonna go back to what we had and just hope that it works for the most part instead of depending on database integrity all right we'll go back to Robo 3t we're gonna just drop this database again fresh drop database drop drop nope drop drop drop databases drop database unique isn't a valid validator database integrity is overrated anyways I agree mm-hmm all right here we go so we try it with nothing all right we get we get stuff now if we try it with og it works and if we try again the slug is in use okay that's that's good enough for me all right let's go ahead and get the URL redirects so if we get slash we should we should see that we're redirected so we'll say slug one oh no we're going to get the ID from wreck dot params we're gonna rename that to slug and then we're going to try we're going to try to find it in the database so we'll say URL equals oh wait URLs dot find one where the slug is that slug and if the URL is a thing we're going to do res de redirect with URL URL URL that URL Oh cuz I use name and not slug oh you're totally right is that what I did not okay is that what happened I don't wanna I can't I can't control Z all my code is that I think that's I think that's it quick stretch we've got 12 minutes we'll the DNS propagate okay and actually I can just click this link oh it should be HTTP now try it should be HTTP okay it's live yeah nice okay no I'm not taking in we have 11 minutes we can get this done so look okay so we'll do this I'm still gonna do the DB lookup wait oh because name was undefined and then name name was the the thing that it was complaining about because name was undefined twice that's what happened right everyone not that's what happened right okay so now slug is fine it should still work oh we can to make this an async function na thank you thank you thank you no no async we can do this okay it's listening all right can we create it with og slug is in use can we create it with just some random one random random random great Oh figma I totally forgot the thing is I don't think I'm gonna have time to make it look pretty I don't know what your design is but I don't know how I'm gonna have time it's beautiful no it's it's gosh-darn beautiful I love it I don't know if I'm gonna have time to make it look like that okay so if we found it we're gonna redirect otherwise we're going to res dot redirect to slash with the error like this slug not and then otherwise we're just going to afford that error on whatever it was oh no we're not because if someone's going here we don't want to get send them a JSON response we just want to send them back to the front end so error link not found we'll just say that that's fine okay this should be good all right so we're here now if we go in our browser and we request HTTP colon slash slash localhost 1337 /og is should redirect to coding garden great great but if we go to HTTP colon slash slash localhost 1337 slash lat it says slug now we need to put that in a template string there we go all right awesome so we've got redirecting now I mean we're not going to implement this route we'll get to that later now we just need the front end now I just need the front end which will actually let people create links so I'm going to pull view J s from a CDN unpackage view latest version yeah this works for me so we have our header here we're then gonna have our main section and then we'll have this with an ID of app and that's where view j/s is gonna live and then we're going to bring in a script that's view and then we'll bring in a script that is our app degeus great so we need a form and in that form we will have a label that says URL I think we will have an input and that label will have an ID oh no the label will have before URL and then the input will have a name of URL and have an ID of URL and so that should hook link those two things up and then we're gonna go ahead and get view going so the v-model will be URL and then we'll do the same thing but we're gonna have the slug so this is for the slug well cool so we have the URL we have the slug and when this thing is submitted so I'll say when this is submitted we want to prevent the default action and we're gonna call create URL and then we need a button so create and type is submit and when it's all done we're gonna just gonna have a we're just gonna show the response from the API those are right here we're gonna say the created will say json stringify created so that should just whatever the API gives back we're gonna show that right below the form that should be fine all right let's actually make it work with some client-side code we'll have an app guess we need to create a new view instance that btq you and then the element is hashtag app our data has a URL which starts off empty it has slug which starts off empty and then we need some methods we need the method that is create URL create URL yeah should be fine and inside of here I'm just gonna log this dot URL and this dots look so the thing is if we would have added bootstrap it would have been like pretty instantly right but it's not what's the saying property or method created is not defined on the instance but reference during render oh and then created will be the API response right now it starts off as normal right refresh great so the URL is HTTP colon slash slash coding garden and then the slug is wow and then we click create and we get it cool so now we just have to call the API so I'm gonna say we're gonna make this an async function we're going to say oh wait fetch with two /url and then the method is post and the data no not the data the body is json stringify the URL which is the Scott URL and the slug which is this dot slug so that's gonna send it full send we should get back some response and then we're going to parse that response will say this stock created equals oh wait response dot JSON great it's a beautiful UI method oh we need our headers you need to say that the content type is that is JSON content tight come to type application all right it's just gonna work so here we go the URL is HTTP code encoding garden the slug is Wow click create we get back the response and now if we go to localhost 1 3 3 7 / wow it redirects to coding garden beautiful now we have three minutes to make it look pretty and like we didn't handle the error page I think that's fine that's totally fine that's totally fine let's just make it look nice okay so we have our ID app-v if the response section I can get behind that it was it's fine this is that we need I spent way too much time trying to set up that index I shouldn't have done that okay the dip with ID app has a width of 80% and it has margin:0 auto great so that should do nothing okay Oh what was I just do wait now we're gonna go with 60% wit in margin:0 auto there we go then all of our inputs actually you know you know what you know what I'm gonna do check this out I'm gonna use my own CSS framework thingy it's not even a framework it's just this easy CSS now that Sh look at that it's beautiful so we put our URL we say wow and then we click create and it gives back the response duplicate key error nice mark my words deploy I've got two seconds all right I'm gonna deploy but if the deploy finishes spark goals did it get push Heroku master and I think ura is the right I don't okay I'm gonna hide my screen for a second well look at the configuration variables mom oh no MongoDB URI we're gonna have to redeploy so in my code the backend actually needs to be a MongoDB URI all right we'll fix that if you two seconds one minute warning all right here we go panic did we do it 30 seconds all right so if I go to here we go moment of truth if I go to C D G C D G Sh uh application error no app crashed up crashed app crashed module cannot find module dot E and V what what what six seconds oh man oh man Oh cuz it's under dev dependencies come on I'm alright we're over let's start counting up how much longer is it gonna take me to get this working yeah we tried everyone we tried okay so that did that one more hour no we're done that doesn't count that I'm sorry everyone I've disappointed you we tried our s I tried we tried our best okay so there's that let's make sure there's no Heroku logs compressing launching all right built exceeded state changed all right I think it's working it looks like HTTP isn't quite working yet but all right URL CG no no it works I thought people are already using it all right so if I go to CD gsh /cg that redirects decoding garden all right it works we were one minute over we've done it everyone thank you we yo rock tested HTTP works it's just not enforced all right we'll have to set up that some HSTs yeah thank you Mirage all right it's ugly but we did it why do I need the index and response OCD gene sh / Alka I like it C D G done sh / Alka how could that TV beautiful all right now time is up oh wait Oh CDG sh / raid nice look at those raid messages nice nice okay all right well thank you drills i'm thank you for being proud of me Heroku has so it's linked up with in lab I'll show you that really quick so if we look at my my resources here Heroku is pretty sweet there's a lot of differently they have Heroku Redis they have Heroku Postgres all of them have a hobby or a free tier the mongolab instance is a 500 megabyte instance you can't see my username and password so that's fine we can see all the URLs people have created CDG sh / twitch is that shorter than no it's nice alright I will say I will say any URLs that you create today are not guaranteed to be there I will probably wipe this database and the thing is I really needed I really needed a URL shortener so I'm glad that I got this domain but as you saw I coated this if the /i who has /i Louis less she / Lee she got nice she's she got is it so is it she got mo a or she da mo makes the root domain redirect to coding duck garden but but then you wouldn't be able to create can you make a loop uh maybe so the URL is this and the slug is let's try to make a loop a redirect loop Wow create slug in use okay well let it generate one for us oh I didn't try it without a slug it's technically broken we need to we need to need you something like this okay so if I go here slash this your redirects there I don't know try to make a loop CDG that sh / IT code pin sad face is that code show CDG's sh less you so this is this is the fun thing about having your own URL shortner is you own like you all of these all of these are up for grabs right way cool wait
Info
Channel: Coding Garden
Views: 454,971
Rating: 4.9091425 out of 5
Keywords: full stack, vscode, javascript, lesson, full stack web development, speed run, monk, games, twitch, educational, mongodb, html, code challenge, mechanical keyboard, css, url shortener, live coding, web development, full stack javascript, node.js, livecoding, learn node.js, learn javascript, beginner, live streaming, livestream, express
Id: gq5yubc1u18
Channel Id: undefined
Length: 57min 5sec (3425 seconds)
Published: Tue Jun 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.