How to Deploy a Node.js App to Render.com for Free (Heroku Alternative)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay today I'm going to show you guys how to upload a node.js application to render.com now what is render.com render.com it's basically just a free and very easy way to upload either websites or backend to the web so as you can see here we have static sites we have services so like node.js and stuff like that you have postgres SQL so you have a bunch of stuff and it's cheap or it's free the only downside to it is I don't even think you have any storage whatsoever if you don't pay for it so it would have to be pretty simple apis but besides that it's pretty cool so I'm going to show you guys what you have to do so I have this node.js application I'm just going to increase my terminal a little bit and increase this so it's a pretty basic app it's just got a server so how we run it uh we can do node server or Source server and then if we open Postman it's for image uploads which I mean you can't even save things on render but either way as you can see just to get at the root directory returns hello server so it's pretty easy I'm just going to open up this you're going to need a GitHub account and what you're going to do is you're going to create a new Repository I think I've already done this I don't think I deleted it yeah I've already done this but you're going to create a repository and click create repository one thing that I need to add in is before you upload your app to GitHub you're going to want to either make a get ignore with so dot get ignore in the root directory with this stuff or you're just going to want to RM slash RF node modules and packagelock.json not package.json package lock especially the node modules because that's going to be a lot of data that you don't need to be storing on GitHub you're gonna get a knit so in the terminal get a net then you're going to do get branch Dash capital M main so we're going to do get add Dot and you're going to do get commit M initial commit okay then you're gonna come to this page you're gonna copy this get remote origin you're going to paste it in here and then you're gonna do get push you origin Main so you're gonna have to have I think like SSH Keys set up on your computer so you can find another tutorial for that so what you're going to do is come to render.com you're going to click sign in you're going to sign in with your GitHub account you're going to authorize render and you're going to complete sign up okay so I had already done that before so it was kind of weird but once you have connected your GitHub and made your render account you're just gonna go new web service you're gonna click connect GitHub you're gonna you can either do all repositories or only select repositories I would do only select because they don't need to see all your repositories for privacy reasons click URL session upload back end click install and I don't know what just happened there okay so click new as you can see click new web service and click connect and okay so this is going to be the name which will be your url so I'm going to use this I'm going to use this and I'm just my username so your root directory you can read this but basically the root directory I just put a dot okay and I'll show you and that just means current directory so that's going to be the main directory right here so I'm also going to make this bigger so environment is node if you're using node you can also use Python go Docker a bunch of stuff then you can select your region then your Branch from your GitHub so this will pull from your GitHub so your build command for this minus npm install if you're using typescript it might be like I think it's TSC dot or something and then start command whatever you're doing to start so remember how we put the current directory as dot so in that case we're going to need to go Source slash server.js because that's how I'm running my app so if I do node Source server.js that'll run my app so oh and I messed that up it needs to be node it needs to be node space Source slash server.js and then if you just scroll down that is all so at this point it's going to install it and it's going to run it and it's going to take a minute because this is a free service so it's obviously slow so you're just gonna have to wait so after about four minutes it will say start it on Port 10 000 which is interesting because I run it on 5000 so they changed that but you will click this where is it right here this link and you can go to it you can see Hello server so the node app is running and that's all so free back end pretty simple
Info
Channel: CodeBrah
Views: 156,406
Rating: undefined out of 5
Keywords: deploy nodejs app to render.com, deploy to render, deploy to render.com, heroku, heroku tutorial, render.com deployment, render.com upload, heroku alternative, heroku alternatives, free nodejs hosting, nodejs, node js, how to deploy to heroku, heroku tutorial for beginners, render.com tutorial, node upload, javascript, nodejs upload, deploy nodejs, upload nodejs, upload node.js, free hosting, free web hosting, codebrah, iOS backend, ios backend, xcode, render deploy react app
Id: bnCOyGaSe84
Channel Id: undefined
Length: 6min 32sec (392 seconds)
Published: Mon Oct 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.