How to deploy a Node Express API to AWS EC2 instance

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 128

  • @WikkiOnIlluminati
    @WikkiOnIlluminati 11 หลายเดือนก่อน +2

    @17:30 when i hit my server after following your step by step and API responded. I was over the moon. Thanks

  • @ishuchauhan7138
    @ishuchauhan7138 ปีที่แล้ว +2

    i had a problem and took 5 days to figure out then i came in to this video and it is solved. Thanks man!

  • @robeeeeerttt
    @robeeeeerttt ปีที่แล้ว +2

    Man, please do not give up from posting videos, you are amazing.

  • @alonaastakhova8533
    @alonaastakhova8533 ปีที่แล้ว +1

    Millions of thanks! I did it! My first interaction with AWS...

  • @piyush6631
    @piyush6631 ปีที่แล้ว +7

    Simple short and concise! Thank you for posting this tutorial. It's very helpful for someone who have little idea about how to host applications on cloud, especially with AWS where there are so many different options to configure a service

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน +1

      Thanks for the message, glad it helped.... 👍

    • @irinamihai-s9n
      @irinamihai-s9n 11 หลายเดือนก่อน

      hi. i have some env variables and i dont know how to scp them in ec2 do you have any tutorial about that?@@Jonathansanchezdev

  • @dmytroboiko1
    @dmytroboiko1 ปีที่แล้ว +2

    Thank you. This is very good starter! It's important for people who never ran such kind of APIs. Connection to instances and AWS security stuff can be difficult, and here provided very minimum but robust case. Like & use it guys.

  • @adarsh-chakraborty
    @adarsh-chakraborty ปีที่แล้ว +1

    Thank you so much!! I needed the security thing after creating the instance.

  • @ankushjain358
    @ankushjain358 ปีที่แล้ว +1

    This is really cool, the way you built the entire project from scratch.

  • @khaledahamada-d1p
    @khaledahamada-d1p ปีที่แล้ว +2

    Dude i just wanted to thank you, this was extremely helpful. You are amazing man. Props

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน +1

      wow thanks for the message.... glad it helped 👍

  • @abhaysingh7477
    @abhaysingh7477 ปีที่แล้ว +1

    I like this tutorial, to the point everything is straightforward.
    thanks jonathan

  • @KatiuskaAlicea
    @KatiuskaAlicea 7 หลายเดือนก่อน +1

    Hi, I'm a novice and I just started an instance and successfully and my API 😊 The only hiccup I encountered was when I attempted to pull the github repo. I did not have a SSH or token. Once I created my personal token and was able to login I saw my tiny json object in the browser calling out to mama that it was running. Thank you!

  • @eliaspaulinho8435
    @eliaspaulinho8435 8 หลายเดือนก่อน +1

    really nice!!
    i am using Xestjs and i was wondering how to deploy my API, your video is really helpfull

  • @Dr460n4ir3
    @Dr460n4ir3 ปีที่แล้ว +4

    I loved this very stright forward exactly what i was looking for. I appreciate you not waisting time with extra stuff.

  • @usamakhan294
    @usamakhan294 ปีที่แล้ว +1

    concise and easy Thanks man

  • @justcoder2868
    @justcoder2868 10 หลายเดือนก่อน

    This is a great video the one thing that would be great to see is how to add env variables. Thanks again

  • @yuvalue
    @yuvalue 11 หลายเดือนก่อน

    thanks brother, I followed along and everything is working perfectly, very appreciated

  • @lucyru7552
    @lucyru7552 4 หลายเดือนก่อน +1

    thank you very much. It's a very helpful video. Separate thanks for an article :)

  • @ayush--gupta
    @ayush--gupta ปีที่แล้ว +1

    Thanks for such wonderful explanation.

  • @UsaSzerelem
    @UsaSzerelem ปีที่แล้ว +1

    Thank you Jonathan. Your explanation was clear and very helpful.

  • @alexmercer416
    @alexmercer416 9 หลายเดือนก่อน +1

    17:23 IS VERY HELPFUL. THANK YOU

  • @ayomikuolatunji1580
    @ayomikuolatunji1580 ปีที่แล้ว +1

    You made a developer. I love you

  • @malumbosiwale3832
    @malumbosiwale3832 9 หลายเดือนก่อน

    after 48 hrs of trying to figure out some other outlandish solutions, this video worked for me! GC -> AWS

  • @GeKKo365
    @GeKKo365 ปีที่แล้ว +1

    God tier video! Helped me so much thank you!!

  • @FilipSrankota
    @FilipSrankota 2 ปีที่แล้ว +3

    Wow! Beautiful step by step tutorial. Thank you.

  • @ttaylor9916
    @ttaylor9916 หลายเดือนก่อน

    great article.. worked. video not quite match medium article... trusting the medium article (PM2)

  • @LakyOk
    @LakyOk ปีที่แล้ว +1

    Sos un genio!! Saludos desde Argentina

  • @dzhenek
    @dzhenek ปีที่แล้ว

    bro thank you so much it was the best working explanation about EC2 deployment. Helped a lot!

  • @swaralipatil9993
    @swaralipatil9993 7 หลายเดือนก่อน +1

    You are amazing☺
    well explained👍👍

  • @LucasFerreira-jm5ie
    @LucasFerreira-jm5ie ปีที่แล้ว +2

    Simple and to the point, great explanation.

  • @davidobodo3605
    @davidobodo3605 ปีที่แล้ว +1

    thank you so much, this was very straightforward and clear

  • @duongdinhxuan7794
    @duongdinhxuan7794 8 หลายเดือนก่อน

    thank you very much, it helped me a lot. It was very clear

    • @Jonathansanchezdev
      @Jonathansanchezdev  4 หลายเดือนก่อน

      You very are welcome! Glad it helped

  • @nayanthulkar1659
    @nayanthulkar1659 9 หลายเดือนก่อน +1

    Greatly explained ❤

  • @xushengchin511
    @xushengchin511 ปีที่แล้ว

    Great, useful, precise, efficient staff. Worth promoting.

  • @imarichildress6297
    @imarichildress6297 ปีที่แล้ว +2

    Great clean instructions. Very helpful.

  • @Sillymonkeies
    @Sillymonkeies ปีที่แล้ว +1

    Great video man! This was my second time using your video. I'm sure there'll be lots more! God bless

  • @quofintech9200
    @quofintech9200 ปีที่แล้ว

    Your videos are awesome!

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน +1

      Glad you enjoyed them, I have more coming out soon....

  • @emiliolemusnieto1305
    @emiliolemusnieto1305 6 หลายเดือนก่อน +1

    Thanks man! I though technology was just against me.

  • @alikhanprogrammer
    @alikhanprogrammer 2 ปีที่แล้ว +2

    Thanks a lot sir, really amazing video

  • @aviralmalik3370
    @aviralmalik3370 5 หลายเดือนก่อน

    Omg you are such a great help to me thanks

  • @alem182
    @alem182 6 หลายเดือนก่อน +1

    Great video mannn, thank you!

  • @HenrryWith2Rs
    @HenrryWith2Rs 10 หลายเดือนก่อน +1

    Brother tu eres un CRANEO! I spent weeks on this and gave up. just couldn't do it. Ran through your tutorial and finally got it working in les than an hour. Would you happen to have anything similar for lambdas? either way you got yourself a like and a follow

  • @mike-wm9ji
    @mike-wm9ji ปีที่แล้ว +1

    Great video, helped a lot!

  • @luizoamorim
    @luizoamorim 2 ปีที่แล้ว +3

    Very good tutorial! Thank you!

  • @yemam4156
    @yemam4156 ปีที่แล้ว +1

    Thanks a lot for the video

  • @adehenry9591
    @adehenry9591 ปีที่แล้ว +1

    I love this, straight to the point 👍

  • @lubwamaemmanuel7743
    @lubwamaemmanuel7743 ปีที่แล้ว +1

    Thanks a lot, this really helped and I learnt a lot.

  • @polar5631
    @polar5631 ปีที่แล้ว +1

    Thanks a ton man! This really helped walk a beginner like me through :)

  • @PranavRaj-l4q
    @PranavRaj-l4q 9 หลายเดือนก่อน

    Great explanations and amazing efforts, one question though how to keep running the server even after closing the terminal??

  • @loksblnine
    @loksblnine ปีที่แล้ว +1

    great tutorial!

  • @vedantchak9638
    @vedantchak9638 ปีที่แล้ว +2

    This is wonderful!

  • @ЭцукоМизуки
    @ЭцукоМизуки ปีที่แล้ว +1

    nicely done!

  • @olegt.8912
    @olegt.8912 ปีที่แล้ว +1

    Good job !!! Thank You!

  • @FauroOficial
    @FauroOficial 2 ปีที่แล้ว +2

    wow amazing tutorial!!, thanks a lot!

  • @santiagocalabro8919
    @santiagocalabro8919 ปีที่แล้ว +3

    Thank you for this tutorial Jonathan, it has been very clear and concise!
    Just one question. I'd like to keep the server running and connected permanent. How can I do that with AWS? Because in the moment I closed the terminal, the server shutted down. In this case, there isn't much difference with running it on localhost. Thank you in advance!

    • @dineshpr
      @dineshpr ปีที่แล้ว +1

      That's where you have to use pm2..

  • @brunofelixf
    @brunofelixf ปีที่แล้ว +1

    Amazing tutorial!!!

  • @haveagoodday544
    @haveagoodday544 ปีที่แล้ว +3

    Beautiful! Thank You! I have 2 questions. (1) How can we set security headers, if I want to allow only one url to hit the API, though that is under dynamic IP protocol, so I cannot restrict inbound security to one IP? (2) How can I add a custom domain to this, so instead of the IP address we see a specific domain name? Thank you in advance for your insights!

  • @MrSimaTai
    @MrSimaTai ปีที่แล้ว

    thank a lot your works. You realy gave me hope ^^

  • @marlysaguila5564
    @marlysaguila5564 ปีที่แล้ว

    DIos mío no sé cómo agradecerte me funcionó luego de mucho quebradero de cabeza INFINITAS GRACIAS!!!!!!

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน +1

      Wow que, lindo mensaje, gracias....

  • @DP_CP
    @DP_CP 7 หลายเดือนก่อน +2

    great!!

  • @AjayKumar-cq7mz
    @AjayKumar-cq7mz ปีที่แล้ว +1

    thankyou for the video

  • @duarrdo_g
    @duarrdo_g ปีที่แล้ว +1

    Thank you very much

  • @lemonyth
    @lemonyth 11 หลายเดือนก่อน +1

    thank you so much

  • @cachis7168
    @cachis7168 ปีที่แล้ว

    Is there a way to use port 80 for don't specify the port?

  • @CamiloLopez-vw8ie
    @CamiloLopez-vw8ie ปีที่แล้ว +1

    you are amazing

  • @palu83x00
    @palu83x00 11 หลายเดือนก่อน +1

    much thanks

  • @mr.tnmemes
    @mr.tnmemes หลายเดือนก่อน +1

    Thank you sir

  • @phoolherreracondezo2841
    @phoolherreracondezo2841 ปีที่แล้ว +1

    this is video i liked, what certifcation i doing for find job :3

  • @vitorsantos3686
    @vitorsantos3686 ปีที่แล้ว +1

    trank you very much

  • @babafemiolasunmade774
    @babafemiolasunmade774 2 ปีที่แล้ว +1

    awesome step by step process.. i have a challenge.. my app has env variables..how do i sort that

    • @samuel2221
      @samuel2221 ปีที่แล้ว +1

      Do the following at the root of your application:
      1. cat > .env
      2. paste your environment variables and exit.
      3. nano .env to update your environment variables.
      I hope it helps ☺

  • @ekeneidiagbor4678
    @ekeneidiagbor4678 ปีที่แล้ว

    Good tutorial thanks a lot. How do you handle re deploying updates?

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน

      At this stage, unfortunately is a manual process of pushing your changes to GH and pulling the changes from the server.
      But for true CI/CD we could use Github Actions to able to accomplish this, hope this gives some direction, but definitely a good next tutorial to create.

  • @sahartoledano7116
    @sahartoledano7116 ปีที่แล้ว

    Very helpful 🙏🏼
    I have two questions
    1. If i want to call the API you published, do i need to use VPN or something?
    2. How to connect that ec2 instance to dns service on AWS ?
    Thank you 👏🏼

  • @khawajakhalil6168
    @khawajakhalil6168 8 หลายเดือนก่อน

    Hey, great video, but when I close my terminal it stops working, how do i keep it running all the time?

  • @MrCuteguylol
    @MrCuteguylol ปีที่แล้ว +1

    how to add env variables?

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน

      So basically you'll need to create the .env file manually on the server via nano or vim. Let me know if that makes sense.

    • @MrCuteguylol
      @MrCuteguylol 11 หลายเดือนก่อน +1

      @@JonathansanchezdevThank you! It makes complete sense. Ill try nano :) Thank you!

  • @wadanemacho
    @wadanemacho ปีที่แล้ว

    Fantastic! is there a Windows pc demo or source?Thanks

  • @abhishekkandikonda1085
    @abhishekkandikonda1085 ปีที่แล้ว +1

    how to set up the https for the bare ip address because it is running on http

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน

      For this one is a bit more involved, but here is an article that I wrote a while back, that might help.
      medium.com/@jonathans199/how-to-apply-ssl-for-https-to-node-express-api-in-aws-ec2-instance-acd43dcbfd4

    • @Shmoji
      @Shmoji 5 หลายเดือนก่อน

      if you want to access it with HTTPS, is a load balancer required?

  • @joseph-hover-lifestyle
    @joseph-hover-lifestyle ปีที่แล้ว

    Do you know how to fix SSL not working? I can access the IP with http but not https

  • @yanmanyiu7774
    @yanmanyiu7774 ปีที่แล้ว

    very goo tutorial, very thank you
    i have one question
    i want the web server keeping run, but when i close the terminal, the webserver will turn off
    what can i do to keep web server running

    • @simonmafanye.3537
      @simonmafanye.3537 ปีที่แล้ว

      Same question i have.

    • @ogt1407gabriel
      @ogt1407gabriel ปีที่แล้ว

      you need to use PM2, he left those steps on his medium article link in his description

  • @shakeelali9418
    @shakeelali9418 2 ปีที่แล้ว +2

    hello brother,
    I have a question where I can find the .env file in node js ec2 AWS ubuntu instance and how I can update it

    • @ogt1407gabriel
      @ogt1407gabriel ปีที่แล้ว

      Do the following at the root of your application:
      1. cat > .env
      2. paste your environment variables and exit.
      3. nano .env to update your environment variables.

  • @krish.mehta.3822
    @krish.mehta.3822 9 หลายเดือนก่อน

    I have a question.. If I launch an EC2 instance like this and I hit aprox 50-100 requests will it start charging me?

  • @ogt1407gabriel
    @ogt1407gabriel ปีที่แล้ว

    It works your a genius, but now how do i do to leave it running while i close aws?

    • @ogt1407gabriel
      @ogt1407gabriel ปีที่แล้ว

      never mind i found it in your medium article thanks man

  • @ElpidioNLimaJunior
    @ElpidioNLimaJunior ปีที่แล้ว

    very good... But when i close the SSH/Putty terminal my application down too... How i do to stay UP application same i close de SSH or Putty terminal ?

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน

      Hope you got it resolved, but if you haven't, at the bottom of this article you will find how to persist the API running using a tool like PM2
      jonathans199.medium.com/how-to-deploy-node-express-api-to-ec2-instance-in-aws-bc038a401156

  • @411sev
    @411sev ปีที่แล้ว

    Thank you sir.

  • @HarshSharma-ct7pz
    @HarshSharma-ct7pz ปีที่แล้ว

    I'm getting Cannot GET / error, what to do?

  • @rickfontes5216
    @rickfontes5216 9 หลายเดือนก่อน

    I've upload my API to an EC2 instance, but the API only works if I access the machine using SSH and run the start command. How can I do my API run all the time?

  • @denmarkdelpuso3737
    @denmarkdelpuso3737 2 ปีที่แล้ว

    Hi thank you for the tutorial. How about amazon linux aws ? Is it the same process? ?

    • @Jonathansanchezdev
      @Jonathansanchezdev  2 ปีที่แล้ว

      yes except you'll have to use the Amazon AMI commands to install the missing packages, using yum
      but you could use this
      curl -o- raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
      . ~/.nvm/nvm.sh
      nvm install node
      then install the version of node you need like this
      nvm install 16

  • @francisakindejoye244
    @francisakindejoye244 ปีที่แล้ว

    How will I set environment variables in ec2 instance? Will I create another .env file in the ec2 instance?

    • @Peter-yd2ok
      @Peter-yd2ok ปีที่แล้ว +2

      Did you figure it out?

    • @piyush6631
      @piyush6631 ปีที่แล้ว +2

      I could be wrong but can't you copy the .env file from your system to the server directory inside the ec2 instance? It'll then be able to read the env file

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน +2

      Yes correct, you could copy your local .env file into the Ubuntu EC2 instance, but this could be a bit more involved, so you could just make a new .env file on the server and copy/paste the Environment variables there.

  • @AyushKumar-uu8vc
    @AyushKumar-uu8vc ปีที่แล้ว +1

    could you please make same thing for golang API..?

  • @egorshumanskii8026
    @egorshumanskii8026 2 ปีที่แล้ว

    Super!

  • @akapriyanshusinghdev
    @akapriyanshusinghdev 7 หลายเดือนก่อน

    Api Not working with production frontend

  • @softwareindustryfacts6770
    @softwareindustryfacts6770 10 หลายเดือนก่อน

    but this link not working with
    what to do

  • @sahilvij2859
    @sahilvij2859 ปีที่แล้ว

    it worked only one time can you help now when i try it says unable to connect

  • @brianvanvlymenpaws
    @brianvanvlymenpaws 8 หลายเดือนก่อน

    is free to use it?

  • @j.k.ravshanovich
    @j.k.ravshanovich 2 ปีที่แล้ว

    On my first attempt the intance worked fine. I created another inctance following the same steps. But API is not working. The URL (public IP address with port) doesn't simply respond even though I have included port number in IPv4 in inboud rules.

    • @sivaharishm314
      @sivaharishm314 ปีที่แล้ว

      Did you fix that ?
      If yes, how did you?

    • @j.k.ravshanovich
      @j.k.ravshanovich ปีที่แล้ว

      @@sivaharishm314 It looks like instance was working fine. I just copied the IPv4 address and pasted into the browser. It worked!

  • @franciscosantana2184
    @franciscosantana2184 11 หลายเดือนก่อน

    genio

    • @Jonathansanchezdev
      @Jonathansanchezdev  11 หลายเดือนก่อน

      Gracias ojala te aya servido de algo

  • @alejandrocr9293
    @alejandrocr9293 9 หลายเดือนก่อน

    Te amo

  • @thyplosion9
    @thyplosion9 ปีที่แล้ว

    You did not use PM2

  • @demurestlmc8361
    @demurestlmc8361 11 หลายเดือนก่อน

    like

  • @professorparadox9826
    @professorparadox9826 6 หลายเดือนก่อน

    but how can we use it on front end it gives cors error not secure