Deploy A Fullstack REACT APP on AWS EC2

  Рет қаралды 50,567

Koding 101

Koding 101

Жыл бұрын

How to deploy a Fullstack REACT Application on the AWS EC2 instance
AWS provides an elegant platform for developers to publicly deploy their applications. This platform is known as the Elastic Compute Cloud. The EC2 instance as it is usually called is a virtual server that makes it possible to develop and deploy applications without concerning oneself with hardware constraints. Although it's a simple platform to set up and get running. It's proven to be quite challenging when you’re a newbie developer who is not really concerned with the technical know-how of how this instance operates and all you’re interested in is deploying your newly built application and having it shared across the internet.
source : github.com/ksekwamote/simple_...
website: kutlosek.xyz
Buy Me Coffee: www.buymeacoffee.com/ksekwamote

Пікірлер: 99
@Jonesgoful
@Jonesgoful 8 ай бұрын
Okay, okay. Very very very good this tutorial. You showed/demonstrated all the steps to nervous beginner! Thanks
@blipblop92
@blipblop92 Жыл бұрын
very good work. One of the few videos I could find to explain it in action! Thank you so much
@theman6429
@theman6429 11 ай бұрын
Excellent video tutorial EXACTLY step for step what i've been studying and trying to do in my boot camp. thank you
@venkysetty9231
@venkysetty9231 10 ай бұрын
awesome! i was going through the video in multiple sessions.. digesting the info slowly.. beautifully done!
@AvikGhosh-mc5yv
@AvikGhosh-mc5yv Жыл бұрын
Best video I've seen so far. Thanks for posting! One minor step: you need to make sure your inbound rules in your security group allow for http, https, and a database (postgres or mysql) immediately after the server is running. Also make sure your VPC network settings allow for all traffic.
@koding_101
@koding_101 Жыл бұрын
Absolutely , thank you
@manavkhandurie3591
@manavkhandurie3591 Жыл бұрын
Thank you so so much for this tutorial. I was finally able to deploy my project 😊
@koding_101
@koding_101 Жыл бұрын
Glad to hear it , this is the reason why i make these videos
@nakseungchoi7154
@nakseungchoi7154 Жыл бұрын
Great content! Keep it up. I've been in your shoes. It may take a while for your channel to go viral but just gotta stay positive and consistent with good contents. Thanks!
@koding_101
@koding_101 Жыл бұрын
It sure does, I've been told that it's especially hard at the beginning stages. But sure I'll continue serving as much content as I could. Thanks for the encouragement.
@emmanuelojima-ojo4873
@emmanuelojima-ojo4873 8 ай бұрын
Thank you very much bro. I've tried this severally without success. Just deployed my api all thanks to you
@MAAAX2211
@MAAAX2211 Ай бұрын
Great content! Keep it up
@abhishekagarwal6742
@abhishekagarwal6742 Жыл бұрын
AWESOME, Great work.
@koding_101
@koding_101 Жыл бұрын
Thank you
@lindelanintuli7620
@lindelanintuli7620 Жыл бұрын
Thanks for this!
@Ayankhan-uc6gd
@Ayankhan-uc6gd 9 ай бұрын
i wish youTube would allow me to like this thousand time..thanks budyy
@koding_101
@koding_101 9 ай бұрын
Wow that means a lot
@plazma5343
@plazma5343 Жыл бұрын
Thank you so much. Im a front dev who spent the Last week eating tutorials and documentation, trying to make sense of all this new cloud world, and this tutorial actually solved some riddles that tortured me. (I get you are South African, i was born in your beautifull country, best regards ;) )
@koding_101
@koding_101 Жыл бұрын
Wow, my pleasure, glad you found my content to be helpful 😄 Im from Botswana but SA is beautiful, i did my degree in SA.
@plazma5343
@plazma5343 Жыл бұрын
@@koding_101 Oh, never had the pleasure of visiting your home country, but nice to see fellow devs from all over the world :)
@elClubdelas7Cifras
@elClubdelas7Cifras Жыл бұрын
yo! thank u a lot . Have to go through the minutes 18:40 again but seems doable. feeback : i think sometimes u just copy code for installation but u dont leave the viewer time to check what u actually are installing. few seconds there would be amazing. besides that and the blue background in the terminal with blue letters, all great. subbed!
@koding_101
@koding_101 Жыл бұрын
Wow, thanks a lot, really appreciate this , your feedback is heard , I'll make sure to wait a few seconds so the viewer can see what is being installed in my next video, thank you for the sub
@RamalekshmiJeyasankar
@RamalekshmiJeyasankar 19 күн бұрын
Hi, I'm using mac OS, should I still select ubuntu when I create my instance in AWS
@lucasmedeiros9755
@lucasmedeiros9755 5 ай бұрын
one question, if i have docker compose, when git cloning my project, can i just type docker-compose up and its done?
@mubashir8036
@mubashir8036 3 ай бұрын
Thank u so much ❤❤❤
@delpsiphi9
@delpsiphi9 Жыл бұрын
Amazing content!! Thanking you very much for this tutorial!! Please can you mention where to find the part 2 of this video (where you explain how to set up DNS).
@koding_101
@koding_101 Жыл бұрын
My utmost pleasure, glad to be of service. You can get the part 2 of this video on the next comment.
@koding_101
@koding_101 Жыл бұрын
kzbin.info/www/bejne/mZfdeZmXr72UotE
@delpsiphi9
@delpsiphi9 Жыл бұрын
@@koding_101 Thank you so much! One more question, I would like to ask. Here you are serving the static build of the frontend from the index.js file of server and then you are setting a proxy in the config file of nginx to direct the traffic to the port where our server is running. But if I want to separately run the client and host say on port 3000 and 5000 respectively, how do I connect to the server from the client side using ipv4 address of ec2 instance? Assuming that nginx is serving the client side only i.e localhost:3000. I'm new to this stuff, and am learning a lot of new things from your videos.
@netsaosa4973
@netsaosa4973 Жыл бұрын
thanks bro, got my server to work. had trouble at first because i was trying to connect to my ec2 instance's public ip using https, but it only worked for http
@koding_101
@koding_101 Жыл бұрын
My absolute pleasure
@netsaosa4973
@netsaosa4973 Жыл бұрын
@@koding_101 Do you think you make a video of this with docker images?
@lelewei8008
@lelewei8008 4 ай бұрын
Thank you sososososo much
@gursahajsinghbedi1150
@gursahajsinghbedi1150 Жыл бұрын
Great Video, Keep up the good work, this video was very detailed compared to other videos on the EC2 deployment, had fun watching this. Can you share the code you pasted on 20:28
@koding_101
@koding_101 Жыл бұрын
server_name yourdomain.com www.yourdomain.com; location / { proxy_pass localhost:5000; #whatever port your app runs on proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
@sairasagnya2901
@sairasagnya2901 9 ай бұрын
can anyone suggest inbound rules for database and one more doubt can anyone please ex[plain why he got node in the application while using terminal in visual studio code
@oatie4262
@oatie4262 10 ай бұрын
Thanks so much for this! Does PM2 listen to port 5001? I re-watched the video a couple of times to see if I missed a step but I couldn’t seem to find the step that connects the app to port 5001.
@koding_101
@koding_101 10 ай бұрын
Not sure i get you but , You connect the app to port 5001 through your Nginx configurations. Watch the next part of this video to get a bit more in depth understanding. kzbin.info/www/bejne/mZfdeZmXr72UotE
@safhanalikhan9299
@safhanalikhan9299 Жыл бұрын
nice video
@mindylee5023
@mindylee5023 2 ай бұрын
Thank you for your video. i have successful host my website. but there is a problem that I don't know why it happens. On my local host environment, the contact page functions well, allowing users to send messages to the admin email address. Yet, after deploying it to the server, this functionality does not work, it could not send message. I'm unsure where I might have gone wrong in the deployment process.
@predatorvsprey8962
@predatorvsprey8962 Жыл бұрын
Thank you
@koding_101
@koding_101 Жыл бұрын
You are most welcome , my absolute pleasure
@shareoi
@shareoi 6 ай бұрын
how you edit file /etc/nginx/sites-available/default ? I can't to commit and to write
@dennistucker2138
@dennistucker2138 Жыл бұрын
Great video. Can you post the code for the location for nginx? It was all blue so everything blended in. Also, how can you assign a static IP to the EC2 instance or is that IP already static?
@koding_101
@koding_101 Жыл бұрын
You need to create what you call an Elastic IP, that's the one you can assign to different EC2 instances. Otherwise an IP will be automatically created for you.
@koding_101
@koding_101 Жыл бұрын
To access the nginx configuration files, you can either use sudo nano /etc/nginx/sites-available/default or sudo vim /etc/nginx/sites-available/default depending on the text editor you prefer.
@MacielDev
@MacielDev 11 ай бұрын
im getting that error on pm2 logs...: "GET / HTTP/1.0" 404 139 console log error on aws ip deploy: Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'none'". Either the 'unsafe-inline' keyword, a hash ('sha256-pShsw8meIjhx77fl5AYeHiS3c1TOGl7Bx2eEqNo+OCk='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback. can you help me please?
@ghulamalishergul562
@ghulamalishergul562 Жыл бұрын
does it work if your backend is written in python and frontend with react? Sorry, if it's stupid question since it's my first time working with deployment
@koding_101
@koding_101 Жыл бұрын
No worries, it's not a stupid question at all! Yes, the deployment process should work similarly regardless of the backend language you are using.
@user-rg2yl8en8s
@user-rg2yl8en8s 8 ай бұрын
Good day sir, thank you for the amazing video. I have stumbled into a problem, I am South African based and upon deploying my reactjs, nodejs and mysql app on netlify and heroku and realized that there is no data center in SA for Heroku and might have latency issues so I resorted to Aws. I have successfully deployed on ec2 (thanks to your amazing tutorial) and the dB on rds. The issue now is that when I run my node and react independently, the Api work perfectly but they don't work when I run the react from node after the npm run build command. My question is what could be causing this and whether you have any idea if I can deploy on heroku and netlify even though there is no dedicated data center in our region.
@jigyansunanda
@jigyansunanda 3 ай бұрын
did you find a solution to this ?
@DennisTuckersAwesome
@DennisTuckersAwesome Жыл бұрын
Great video. Can you post the code for the location and what was commented out, the colors all blended. Also, how do you assign a static IP address to the EC2 instance?
@koding_101
@koding_101 Жыл бұрын
server_name yourdomain.com www.yourdomain.com; location / { proxy_pass localhost:5000; #whatever port your app runs on proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
@koding_101
@koding_101 Жыл бұрын
I hope I've answered all your questions , If you continue to experience problems, got to my website www.kutlosek.xyz and reach out to me.
@TheFearlessGoat
@TheFearlessGoat Жыл бұрын
What happens to the absolute path when the app gets deployed? Can you still use the same one as path.join(_dirname , "../client/build")?
@koding_101
@koding_101 Жыл бұрын
The absolute path _dirname is relative to the file structure from where you have deployed your application, it is dynamic. I don't expect it to change unless you were to hard code it.
@TheFearlessGoat
@TheFearlessGoat Жыл бұрын
If you want to make changes to the application after you already deployed it, do you have to repeat this whole process? Let's say you make a new push to the github repo, can you easily get those changes by doing a git fetch & pull in the EC2 instance?
@koding_101
@koding_101 Жыл бұрын
It's as simple as working on your project locally. You just need to git pull your changes and then use PM2 to restart the application. If the changes do not reflect, restart your Nginx web server. If they still do not reflect , then flush your local DNS settings in your local computer.
@TheFearlessGoat
@TheFearlessGoat Жыл бұрын
@@koding_101 Hey, I really appreciate you taking the time to answer my questions. After hours of stress, my app is finally deployed because of you. In the app, I have a button that would redirect to localhost:5000/dashboard. It's not working anymore because can’t establish a connection to the server at localhost:3005. I'm guessing I would have to change the redirect link for the button to the Public IPv4 address/dashboard instead of localhost:5000/dashboard? So would it be smart to go to my code and change any link that redirects to localhost to the public ipv4 address?
@DennisTuckersAwesome
@DennisTuckersAwesome Жыл бұрын
I would like a video on the security please. 🙂
@koding_101
@koding_101 Жыл бұрын
Security? could you elaborate please...
@DennisTuckersAwesome
@DennisTuckersAwesome Жыл бұрын
@@koding_101 securing settings to secure the EC2 instance. You mentioned if we wanted a video on security for the EC2 instance, mention it in the comments. Right now, it’s kind of exposed.
@koding_101
@koding_101 Жыл бұрын
@@DennisTuckersAwesome Ohh yeah that's right, like setting up firewalls and security groups, most definitely , that's in my plans , i'll do a complete thing on AWS
@ahmedsenousy6734
@ahmedsenousy6734 Жыл бұрын
Great job bro, I wanna give u a few hints though: 1- sry to say ur intro is boring😅, what I mean is that it's a long intro so try to say everything u wanna say as fast as possible just not to lose the attention of ur viewers. 2- if u have the money invest in a good microphone 3- try to show ur face in the videos sometimes, even if it's only for the intro: this way u create a connection with ur viewers and seem to them like a real person, and it also helps with building a brand to urself other than that thanks for the amazing video bro, really!!!
@koding_101
@koding_101 Жыл бұрын
Thank you Ahmed, those us some great pointers, i've been really trying with my intros lately , cos I've head intros are everything , would you be kind enough to listen to some of my latest content and see whether I've improved in that regard?
@koding_101
@koding_101 Жыл бұрын
I am saving up for a proper mic and camera so i can deliver quality audio and show my face as well. You're absolutely right.
@ahmedsenousy6734
@ahmedsenousy6734 Жыл бұрын
@@koding_101 sry to reply that late, but yeah sure, I'll try to free some time and help u if I could
@koding_101
@koding_101 Жыл бұрын
@@ahmedsenousy6734 Sure thing , thanx a lot , appreciate it
@art_ik
@art_ik Жыл бұрын
@@koding_101 DM me I can help maybe.
@ASK-pt4ew
@ASK-pt4ew Жыл бұрын
First of all thanks for this tutorial! I was able to follow each step but still end up with 502 bad gateway error. What have I done wrong here?
@koding_101
@koding_101 Жыл бұрын
I suspect your application might not be actively running in the background. Check your pm2 logs to ascertain that your application is indeed running properly.
@koding_101
@koding_101 Жыл бұрын
Hey did you manage to solve this?
@daisytran4813
@daisytran4813 Жыл бұрын
Is it a good practice that I run the application in a Docker container which is on EC2?
@koding_101
@koding_101 Жыл бұрын
Yes its good practice but not really necessary if you're a beginner.
@daisytran4813
@daisytran4813 Жыл бұрын
@@koding_101 Thank you for your reply, I have a project to be in prod in the near future, and hosting on Docker will definitely be the easiest way.
@koding_101
@koding_101 Жыл бұрын
@@daisytran4813 Absolutely, it will really streamline your development process and maintain consistency between production and development environment.
@fun_factory880
@fun_factory880 8 ай бұрын
I have a issue here what if my react app route and api end point is same..? Eagerly waiting for your answer
@eliteturtle6090
@eliteturtle6090 5 ай бұрын
Pretty sure that means your project is in one directory, so all you have to do is skip the first part of the video where he loads the front end build into the backend
@edmundebiyenrin
@edmundebiyenrin Жыл бұрын
Thanks sir, Pls I deploy my mern stack app on ec2 but the mongodb url is not connecting showing error_connection_refused in console. I'm using atlas mongodb free tier. Help please
@koding_101
@koding_101 Жыл бұрын
Did you test your application locally, does it work as it should?
@koding_101
@koding_101 Жыл бұрын
Where did you save your MongoDB URL , is it in an .env file?
@edmundebiyenrin
@edmundebiyenrin Жыл бұрын
@@koding_101 I directly include it in my node index.js file
@jenniferfan8155
@jenniferfan8155 5 ай бұрын
did you get the solution ?
@user-wt1vw3yu1t
@user-wt1vw3yu1t 6 ай бұрын
can you paste the nginx configuration please?
@tuananhngyen2985
@tuananhngyen2985 10 ай бұрын
how can I find part 2 of this video ?
@koding_101
@koding_101 10 ай бұрын
Hi , thank you for watching , this is part 2 of this series kzbin.info/www/bejne/mZfdeZmXr72UotE
@balasubramaniam7904
@balasubramaniam7904 8 ай бұрын
is this automatic deployment
@Ecity1997
@Ecity1997 3 ай бұрын
does this work with react native?
@koding_101
@koding_101 3 ай бұрын
No it doesnt unfortunately , very different environments all together
@romimaximus
@romimaximus Жыл бұрын
I gonna have to watch this video about 50 times, cause "aws" is the most complicated cloud in the world, and i have no idea what you just did, specially the part that you didnt explain "Key pair" on the 5:55mins and on, ...but anyway all of it is very complicated for beginners in "aws"... i try it once, but i gave up. and went deploy y app on netlify, ...and only took me 3 mins.... lol...
@koding_101
@koding_101 Жыл бұрын
I can tell you from experience that sometimes that's what it takes to understand something, watch it a couple of times and do your external research. A KEY PAIR file is more of a password or a door key that is needed to access your EC2 instance. Your EC2 instance of cos is more of a virtual server that is needed in order to run your applications. Think of a virtual server as more of a separate computer somewhere in the cloud. Let me know if this helps you understand better so I can elaborate more.
@adambaruch6787
@adambaruch6787 6 ай бұрын
who was the female saying alright
Lighthouse on localhost is bad
11:10
Nathan Krasney
Рет қаралды 918
Create an AWS Elastic Beanstalk Application
8:28
Digital Cloud Training
Рет қаралды 2,4 М.
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 15 МЛН
Чай будешь? #чайбудешь
00:14
ПАРОДИИ НА ИЗВЕСТНЫЕ ТРЕКИ
Рет қаралды 2,9 МЛН
Where to Host a Fullstack Project on a Budget
21:44
Ben Awad
Рет қаралды 331 М.
How to Deploy React App on AWS EC2 #aws #ec2
21:11
Aliraza Khan
Рет қаралды 30 М.
How To Deploy React App To Aws EC2 || Step by Step Tutorial
27:26
The Logic Lab
Рет қаралды 7 М.
How to deploy React App on AWS S3
5:31
Coding Journey With Akash
Рет қаралды 6 М.
Deploy React App to S3 with Custom Domain
14:04
Sam Meech-Ward
Рет қаралды 21 М.
Full Node.js Deployment - NGINX, SSL With Lets Encrypt
31:25
Piyush Garg
Рет қаралды 48 М.
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Рет қаралды 171 М.
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 15 МЛН