How To Deploy MERN (Mongo Express React Node) Stack App on AWS EC2 - THE RIGHT WAY!

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 50

  • @poloska9471
    @poloska9471 6 лет назад +6

    Gota admit, I want to see more videos like this man! You have a pretty epic style! Your videos are not overdone and all markety bullshitty

  • @RyanSmith-qb6dl
    @RyanSmith-qb6dl 2 года назад +2

    Hey guys! IM Ryan smith, the guy who created this tutorial ! :D I honestly cannot remember the email or any of the credentials that are for logging into this acc, but tomorrow Ill do my best to retrieve this youtube account and not only update this, but continue to add ore since I got such positive feedback! I deeply apologies for not responding to any of you!!!... ESPECIALLY the ones who got stuck along the way and needed help. I will be gone for a couple weeks to a few months (OERSONAL TINGS) But if anyone sees this within the next few days form now, I will gladly make time to help you. For now I will sift through all of these current comments and do my very best, I forgot all about this tutorial Until it came time to deploy another MERN stack app for the first time in years! I obviously will need to update this entire tutorial as its been 2-4 years since. And im sure by now, most of it isnt working as you know how the industry goes.. in 6 months EVERYHITNG IS DIFF and now its REFRESH UP-TO-DATE Standards time! :D I can only imagine how much ill have to change... as REDUX I havnt seen used in a while :D SO I may have to rewrite and redo Everything. AND THATS WHAT WE HERE FOR! "Brain aneurysms" YAAAA!! ;')
    NONETHELESS!!! THANK YOU ALL for such positive responses! Its gratitude like this, that makes people like me, continue these types of videos! :D

  • @veronikakoltunova3994
    @veronikakoltunova3994 4 года назад

    Dude, by FAR the best video i've seen so far on EC2 deployment! Live&time saving! Tons of thanks!

  • @budosk
    @budosk 6 лет назад +2

    This video is a life saver. Thank you so much Ryan!!! Please post more videos!

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 6 лет назад

      Thanks butch! Glad to see some are getting some use out of this information! More soon to come!

  • @ploratran
    @ploratran 5 лет назад +2

    Live-saving tutorial. Thank you!

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      MY pleasure! WE ALL have been in the same boat of "STRENGTH THROUGH STRUGGLE" IM glad that my struggles can give others instant understanding for their desires, and thus gaining STRENGTH for your goal of success!

  • @lokeshbajracharya5190
    @lokeshbajracharya5190 4 года назад

    OMG THIS VIDEO IS THE BESTTTT!!!!! thanksssss alott

  • @jiajun898
    @jiajun898 4 года назад

    HOLY COW! YOU JUST SAVED MY DAY! THANK YOU VERY VERY VERY VERY MUCH!

  • @What_was_wrong_w_jst_our_names
    @What_was_wrong_w_jst_our_names 5 лет назад +3

    to paste in git bash: Shift+insert insert is next to delete key

  • @H4wk3ye1
    @H4wk3ye1 4 года назад

    Worked perfectly. Thank you

  • @randalerman8879
    @randalerman8879 6 лет назад +2

    Just wow... Found your tutorial, and then this web set of instructions. Really amazing job. I had never deployed anything close to this type of stack, and your instructions were spot on. Some little things for people who find this. Ubuntu on EC2 is up at 18, and that is no issue following these instructions. The web instructions are not very clear on the private IP and port number, so this video helps a ton if you are getting a bad gateway after deployment.

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 6 лет назад

      Thanks for you kind words! Sorry it took me this long to respond! Yes ubuntu is now utilizing 18.0 which shouldn't be any different in setting it up. As for the private IP, the way I learned, was to use the private IP from your Instance. I honestly cannot remember why, But through trial and error, utilizing the private IP works. If you use your public IP you will indefinitely get a bad gateway error.

    • @sophiaorlando9697
      @sophiaorlando9697 3 года назад

      @@RyanSmith-qb6dl So for deployment, do we use public or private IP? neither work for me : /

  • @NimbusDevOps
    @NimbusDevOps 3 года назад

    Is this app connected to the db? Can you make an api call by clicking any of your client links that show it return data?

  • @shishirkajishrestha1505
    @shishirkajishrestha1505 4 года назад

    I will be honest with ya Ryan, this tut was helpful but is not current. Thanks you are making a difference !
    for instance, installing node via ubuntu repo delivers older version of nodejs which causes issues. the ubuntu 18.04 does not have /var/www directory
    I might be wrong but for sake of other users.

  • @JustGamingJG
    @JustGamingJG 3 года назад

    I followed these steps and app is working if i access it from ip but i have a subdomain and ssl installed from cloudflare. Accessing it from subdomain gives Error 521

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      Hey sorry for my late respond and ill do my best to update this video, but using a cloud flare ssl security ticket, should not get in the way of any of this? I will in due time here update everything since now im aware this video actually got a good outcome. But, im sure by now you may have figured it out? If so please post here for others. As well, I must express... You'd be surprised how OFTEN the issue is just a simple typo or bug that may have been mistakenly added during the process of following these steps initially :D

  • @chadmartin3196
    @chadmartin3196 6 лет назад +2

    I keep getting a 502 bad gateway... any suggestions?

    • @jerinthomas714
      @jerinthomas714 5 лет назад

      Did you get the solution?

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад +1

      @@jerinthomas714 hey guys sorry for the delay. This is something that sounds like its on your guys end. with CORS, and/or your domain names AND/or your PORT forwarding's from where ever you bought your URL from. Each company you purchased your DOMAIN name from, will 100% differ and you wil have to ask them for assistance. From there, it should work. Also make sure your running it concurrently. so that your running BOTH THE FRONT END AND BACK END... Infact! I actually think thats your prob.. because 502 means like its not connecting at all, or theres something interfering with its attempted connection. Alot of the time when ive had this problem its because i ran the back end and not the front end and/or Vise versa :D

  • @chandrakiranachanta1853
    @chandrakiranachanta1853 5 лет назад

    Woow.. such an awesome way to show how to deploy... kudos to you man... amazing job. One question is... if I update my Git repo, can i just git pull inside the server? or any other steps I would need to perform?

    • @retardo4170
      @retardo4170 5 лет назад

      i think just pulling the repo and restarting will do the job!

  • @henrylin1935
    @henrylin1935 3 года назад

    type in "cd client", but there is no client folder, what should I do?

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      First off SO SORRY for my delay! But if you dont have a client folder, then YOU NEVER INSTALLED react unfortunately :D Scroll up to the steps where it is installing FRONT END(React, concurrently, REDUX), etc. :D
      HOWEVER... this is probably... EXTREAMLY outdated by now... So i will here VERY SOON, post the updated versions. Thanks again!

  • @talalnajam8692
    @talalnajam8692 5 лет назад

    Great tutorial! Thanks a lot! are there any additional steps from the mern stack course? because he used a post build script that's used by heroku. Once again, thanks!

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      Well its kinda funny to respond to this type of statement since the answer is going to be yes at this point. EVERYTHING is diff now.... and considering this is 3 years ago, YOU PROB have figured it out :D BUt thanks for asking and IM sorry I wasnt here to help you out me.

  • @timiland5881
    @timiland5881 3 года назад

    Great video, anyone else getting a 500 error on their server and know how to fix it?

  • @nicoalcalde6053
    @nicoalcalde6053 5 лет назад

    I followed each step properly and was fine but after I:
    cd /var/www/
    sudo chown -R ubuntu {{AppName}}
    It says no such file or directory exists even though I put in my app name.
    Any ideas? I tried both the github repo name and the name of my ec2

    • @rosyTown1
      @rosyTown1 5 лет назад

      I'm stuck at the exact same point. Did you ever find a solution for this?

    • @nicoalcalde6053
      @nicoalcalde6053 5 лет назад

      Rosy Town No, sorry. Did you happen to use mongo atlas for your database?

    • @rosyTown1
      @rosyTown1 5 лет назад

      @@nicoalcalde6053 No, not using anything at the moment lol. Thanks anyways :)

    • @TrapArmsProductions
      @TrapArmsProductions 5 лет назад

      @@nicoalcalde6053 you're supposed to first clone your git repository in /var/www and then you can change the permissions of the directory.

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      hey sorry for the late response, but yeas you didnt create the folder lol :D Your doing "CD(CHANGE DIRECTORY)" FOR DESTINATION "/var/www/" BUT, when did you ever create these files? You apparently skipped that step :D And no worries , It happens! try " touch /var/www"

  • @omarsalka5665
    @omarsalka5665 5 лет назад

    How can I create environment variables for my web app on aws. I have a third party api that requires an application client id & secret and would like to store them in my aws environment for me to access using 'process.env' in my code.

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      This is something to do with windows Go to youtube and type HOW TO ADD ENVIRONMENT VARIABLE. OR you could try poking around in the area its stored it. HIT windows key, or search bar, and type ENVIRONMENT VARIABLE, the windows section for such will pop right open. From there you will add these variables within your main directories on said live deployments.

  • @benabitbol7767
    @benabitbol7767 6 лет назад

    You don’t explain how you display front end part from the server , you also don’t explain https and ci/cd integration, also you don’t talk about scaling ;(

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 6 лет назад +1

      Im a bit confused on what you mean by "display the front end"?? I did express that p2m allows you to run your back end and front simultaneously.. Other than that, I'm not sure what your referring to. As for scaling, yes I didn't talk about or show this, as I didn't feel it was necessary.. If it's something you and others desire, I can make another video. AS for ci/cd integration, that I feel is unnecessary... This is a video how to deploy your MERN stack app as there was NONE online that actually worked. This video is not to cover every aspect of every little thing.. Why would one need to explain https and ci/cd? When you could just follow what I do... Sorry you didn't find this video helpful. Let me know if you have any more questions.

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      Hey sorry for the late response but uh...FORTUNATELLY for everyone I actually did :D LOL! AND, no offense.. IF YOUR unaware of this? YOU might need to study up a bit more my friend :D. IF you go to the section where THE ACTUAL APP is run/building for use? IT utilized a package called "CONCURRENTLY" which simultaneously RUNS BOTH the front and back end within the same terminal so that you dont need multiple windows open, and for simplistic automation from typing in one line rather than 5 :D
      How front end frameworks , work, is they are almost like 2 back ends... (which its not, but understanding that concept may help shine understanding.. because REACT and ANGULAR at this point in time, to achieve asynchronous outcomes, without using JQUERY or AJAX ( WHICH at the time was the only way to be LIVE RUNTIME/RERSHING /Updates/Socketing.) They kinda... entwined EMBEDDED JAVASCRIPT AKA (JSX) into the front end HTML and CSS/react-strap sections. Kinda like "EJS" and/or "HANDLEBARS.JS" BUt both the front and eback end that are both deployed live, but on 2 separate ports :D. AND THEN through your api and route connections, will plug in together like the TOP AND BOTTOm half of a 2 story house :D. In this case, the front end client side is being run on port 3000, and the back end side, is being run on 5000 :D Good LUCk

  • @utkarsh_108
    @utkarsh_108 5 лет назад

    IT ASKS FOR CREDIT CARD

    • @RyanSmith-qb6dl
      @RyanSmith-qb6dl 2 года назад

      Hey sorry for the delays, but that sounds like its an issue with your app and your app alone... Nothing I can really do to help you as the instructions above, HAS NOTING to do with your third parties services of payment... Good luck.

  • @ahmetulutas8491
    @ahmetulutas8491 2 года назад

    Dude stop coughing on the mic. You made me deaf with airpods.

  • @happinin
    @happinin 2 года назад

    can you at least make videos without mumbling under your breath and sounding like you're half asleep?
    speak clearly man!